1 /** 2 Server interface for low level physics access. 3 4 Copyright: 5 Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. 6 Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) 7 Copyright (c) 2017-2018 Godot-D contributors 8 9 License: $(LINK2 https://opensource.org/licenses/MIT, MIT License) 10 11 12 */ 13 module godot.physicsserver; 14 import std.meta : AliasSeq, staticIndexOf; 15 import std.traits : Unqual; 16 import godot.d.meta; 17 import godot.core; 18 import godot.c; 19 import godot.d.bind; 20 import godot.d.reference; 21 import godot.object; 22 import godot.physicsdirectspacestate; 23 import godot.physicsdirectbodystate; 24 /** 25 Server interface for low level physics access. 26 27 Everything related to physics in 3D. 28 */ 29 @GodotBaseClass struct PhysicsServerSingleton 30 { 31 enum string _GODOT_internal_name = "PhysicsServer"; 32 public: 33 @nogc nothrow: 34 union { godot_object _godot_object; GodotObject _GODOT_base; } 35 alias _GODOT_base this; 36 alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses); 37 package(godot) __gshared bool _classBindingInitialized = false; 38 package(godot) static struct _classBinding 39 { 40 __gshared: 41 godot_object _singleton; 42 immutable char* _singletonName = "PhysicsServer"; 43 @GodotName("shape_create") GodotMethod!(RID, long) shapeCreate; 44 @GodotName("shape_set_data") GodotMethod!(void, RID, Variant) shapeSetData; 45 @GodotName("shape_get_type") GodotMethod!(PhysicsServer.ShapeType, RID) shapeGetType; 46 @GodotName("shape_get_data") GodotMethod!(Variant, RID) shapeGetData; 47 @GodotName("space_create") GodotMethod!(RID) spaceCreate; 48 @GodotName("space_set_active") GodotMethod!(void, RID, bool) spaceSetActive; 49 @GodotName("space_is_active") GodotMethod!(bool, RID) spaceIsActive; 50 @GodotName("space_set_param") GodotMethod!(void, RID, long, double) spaceSetParam; 51 @GodotName("space_get_param") GodotMethod!(double, RID, long) spaceGetParam; 52 @GodotName("space_get_direct_state") GodotMethod!(PhysicsDirectSpaceState, RID) spaceGetDirectState; 53 @GodotName("area_create") GodotMethod!(RID) areaCreate; 54 @GodotName("area_set_space") GodotMethod!(void, RID, RID) areaSetSpace; 55 @GodotName("area_get_space") GodotMethod!(RID, RID) areaGetSpace; 56 @GodotName("area_set_space_override_mode") GodotMethod!(void, RID, long) areaSetSpaceOverrideMode; 57 @GodotName("area_get_space_override_mode") GodotMethod!(PhysicsServer.AreaSpaceOverrideMode, RID) areaGetSpaceOverrideMode; 58 @GodotName("area_add_shape") GodotMethod!(void, RID, RID, Transform) areaAddShape; 59 @GodotName("area_set_shape") GodotMethod!(void, RID, long, RID) areaSetShape; 60 @GodotName("area_set_shape_transform") GodotMethod!(void, RID, long, Transform) areaSetShapeTransform; 61 @GodotName("area_get_shape_count") GodotMethod!(long, RID) areaGetShapeCount; 62 @GodotName("area_get_shape") GodotMethod!(RID, RID, long) areaGetShape; 63 @GodotName("area_get_shape_transform") GodotMethod!(Transform, RID, long) areaGetShapeTransform; 64 @GodotName("area_remove_shape") GodotMethod!(void, RID, long) areaRemoveShape; 65 @GodotName("area_clear_shapes") GodotMethod!(void, RID) areaClearShapes; 66 @GodotName("area_set_collision_layer") GodotMethod!(void, RID, long) areaSetCollisionLayer; 67 @GodotName("area_set_collision_mask") GodotMethod!(void, RID, long) areaSetCollisionMask; 68 @GodotName("area_set_param") GodotMethod!(void, RID, long, Variant) areaSetParam; 69 @GodotName("area_set_transform") GodotMethod!(void, RID, Transform) areaSetTransform; 70 @GodotName("area_get_param") GodotMethod!(Variant, RID, long) areaGetParam; 71 @GodotName("area_get_transform") GodotMethod!(Transform, RID) areaGetTransform; 72 @GodotName("area_attach_object_instance_id") GodotMethod!(void, RID, long) areaAttachObjectInstanceId; 73 @GodotName("area_get_object_instance_id") GodotMethod!(long, RID) areaGetObjectInstanceId; 74 @GodotName("area_set_monitor_callback") GodotMethod!(void, RID, GodotObject, String) areaSetMonitorCallback; 75 @GodotName("area_set_area_monitor_callback") GodotMethod!(void, RID, GodotObject, String) areaSetAreaMonitorCallback; 76 @GodotName("area_set_monitorable") GodotMethod!(void, RID, bool) areaSetMonitorable; 77 @GodotName("area_set_ray_pickable") GodotMethod!(void, RID, bool) areaSetRayPickable; 78 @GodotName("area_is_ray_pickable") GodotMethod!(bool, RID) areaIsRayPickable; 79 @GodotName("body_create") GodotMethod!(RID, long, bool) bodyCreate; 80 @GodotName("body_set_space") GodotMethod!(void, RID, RID) bodySetSpace; 81 @GodotName("body_get_space") GodotMethod!(RID, RID) bodyGetSpace; 82 @GodotName("body_set_mode") GodotMethod!(void, RID, long) bodySetMode; 83 @GodotName("body_get_mode") GodotMethod!(PhysicsServer.BodyMode, RID) bodyGetMode; 84 @GodotName("body_set_collision_layer") GodotMethod!(void, RID, long) bodySetCollisionLayer; 85 @GodotName("body_get_collision_layer") GodotMethod!(long, RID) bodyGetCollisionLayer; 86 @GodotName("body_set_collision_mask") GodotMethod!(void, RID, long) bodySetCollisionMask; 87 @GodotName("body_get_collision_mask") GodotMethod!(long, RID) bodyGetCollisionMask; 88 @GodotName("body_add_shape") GodotMethod!(void, RID, RID, Transform) bodyAddShape; 89 @GodotName("body_set_shape") GodotMethod!(void, RID, long, RID) bodySetShape; 90 @GodotName("body_set_shape_transform") GodotMethod!(void, RID, long, Transform) bodySetShapeTransform; 91 @GodotName("body_get_shape_count") GodotMethod!(long, RID) bodyGetShapeCount; 92 @GodotName("body_get_shape") GodotMethod!(RID, RID, long) bodyGetShape; 93 @GodotName("body_get_shape_transform") GodotMethod!(Transform, RID, long) bodyGetShapeTransform; 94 @GodotName("body_remove_shape") GodotMethod!(void, RID, long) bodyRemoveShape; 95 @GodotName("body_clear_shapes") GodotMethod!(void, RID) bodyClearShapes; 96 @GodotName("body_attach_object_instance_id") GodotMethod!(void, RID, long) bodyAttachObjectInstanceId; 97 @GodotName("body_get_object_instance_id") GodotMethod!(long, RID) bodyGetObjectInstanceId; 98 @GodotName("body_set_enable_continuous_collision_detection") GodotMethod!(void, RID, bool) bodySetEnableContinuousCollisionDetection; 99 @GodotName("body_is_continuous_collision_detection_enabled") GodotMethod!(bool, RID) bodyIsContinuousCollisionDetectionEnabled; 100 @GodotName("body_set_param") GodotMethod!(void, RID, long, double) bodySetParam; 101 @GodotName("body_get_param") GodotMethod!(double, RID, long) bodyGetParam; 102 @GodotName("body_set_kinematic_safe_margin") GodotMethod!(void, RID, double) bodySetKinematicSafeMargin; 103 @GodotName("body_get_kinematic_safe_margin") GodotMethod!(double, RID) bodyGetKinematicSafeMargin; 104 @GodotName("body_set_state") GodotMethod!(void, RID, long, Variant) bodySetState; 105 @GodotName("body_get_state") GodotMethod!(Variant, RID, long) bodyGetState; 106 @GodotName("body_add_central_force") GodotMethod!(void, RID, Vector3) bodyAddCentralForce; 107 @GodotName("body_add_force") GodotMethod!(void, RID, Vector3, Vector3) bodyAddForce; 108 @GodotName("body_add_torque") GodotMethod!(void, RID, Vector3) bodyAddTorque; 109 @GodotName("body_apply_central_impulse") GodotMethod!(void, RID, Vector3) bodyApplyCentralImpulse; 110 @GodotName("body_apply_impulse") GodotMethod!(void, RID, Vector3, Vector3) bodyApplyImpulse; 111 @GodotName("body_apply_torque_impulse") GodotMethod!(void, RID, Vector3) bodyApplyTorqueImpulse; 112 @GodotName("body_set_axis_velocity") GodotMethod!(void, RID, Vector3) bodySetAxisVelocity; 113 @GodotName("body_set_axis_lock") GodotMethod!(void, RID, long, bool) bodySetAxisLock; 114 @GodotName("body_is_axis_locked") GodotMethod!(bool, RID, long) bodyIsAxisLocked; 115 @GodotName("body_add_collision_exception") GodotMethod!(void, RID, RID) bodyAddCollisionException; 116 @GodotName("body_remove_collision_exception") GodotMethod!(void, RID, RID) bodyRemoveCollisionException; 117 @GodotName("body_set_max_contacts_reported") GodotMethod!(void, RID, long) bodySetMaxContactsReported; 118 @GodotName("body_get_max_contacts_reported") GodotMethod!(long, RID) bodyGetMaxContactsReported; 119 @GodotName("body_set_omit_force_integration") GodotMethod!(void, RID, bool) bodySetOmitForceIntegration; 120 @GodotName("body_is_omitting_force_integration") GodotMethod!(bool, RID) bodyIsOmittingForceIntegration; 121 @GodotName("body_set_force_integration_callback") GodotMethod!(void, RID, GodotObject, String, Variant) bodySetForceIntegrationCallback; 122 @GodotName("body_set_ray_pickable") GodotMethod!(void, RID, bool) bodySetRayPickable; 123 @GodotName("body_is_ray_pickable") GodotMethod!(bool, RID) bodyIsRayPickable; 124 @GodotName("body_get_direct_state") GodotMethod!(PhysicsDirectBodyState, RID) bodyGetDirectState; 125 @GodotName("joint_create_pin") GodotMethod!(RID, RID, Vector3, RID, Vector3) jointCreatePin; 126 @GodotName("pin_joint_set_param") GodotMethod!(void, RID, long, double) pinJointSetParam; 127 @GodotName("pin_joint_get_param") GodotMethod!(double, RID, long) pinJointGetParam; 128 @GodotName("pin_joint_set_local_a") GodotMethod!(void, RID, Vector3) pinJointSetLocalA; 129 @GodotName("pin_joint_get_local_a") GodotMethod!(Vector3, RID) pinJointGetLocalA; 130 @GodotName("pin_joint_set_local_b") GodotMethod!(void, RID, Vector3) pinJointSetLocalB; 131 @GodotName("pin_joint_get_local_b") GodotMethod!(Vector3, RID) pinJointGetLocalB; 132 @GodotName("joint_create_hinge") GodotMethod!(RID, RID, Transform, RID, Transform) jointCreateHinge; 133 @GodotName("hinge_joint_set_param") GodotMethod!(void, RID, long, double) hingeJointSetParam; 134 @GodotName("hinge_joint_get_param") GodotMethod!(double, RID, long) hingeJointGetParam; 135 @GodotName("hinge_joint_set_flag") GodotMethod!(void, RID, long, bool) hingeJointSetFlag; 136 @GodotName("hinge_joint_get_flag") GodotMethod!(bool, RID, long) hingeJointGetFlag; 137 @GodotName("joint_create_slider") GodotMethod!(RID, RID, Transform, RID, Transform) jointCreateSlider; 138 @GodotName("slider_joint_set_param") GodotMethod!(void, RID, long, double) sliderJointSetParam; 139 @GodotName("slider_joint_get_param") GodotMethod!(double, RID, long) sliderJointGetParam; 140 @GodotName("joint_create_cone_twist") GodotMethod!(RID, RID, Transform, RID, Transform) jointCreateConeTwist; 141 @GodotName("cone_twist_joint_set_param") GodotMethod!(void, RID, long, double) coneTwistJointSetParam; 142 @GodotName("cone_twist_joint_get_param") GodotMethod!(double, RID, long) coneTwistJointGetParam; 143 @GodotName("joint_get_type") GodotMethod!(PhysicsServer.JointType, RID) jointGetType; 144 @GodotName("joint_set_solver_priority") GodotMethod!(void, RID, long) jointSetSolverPriority; 145 @GodotName("joint_get_solver_priority") GodotMethod!(long, RID) jointGetSolverPriority; 146 @GodotName("joint_create_generic_6dof") GodotMethod!(RID, RID, Transform, RID, Transform) jointCreateGeneric6dof; 147 @GodotName("generic_6dof_joint_set_param") GodotMethod!(void, RID, long, long, double) generic6dofJointSetParam; 148 @GodotName("generic_6dof_joint_get_param") GodotMethod!(double, RID, long, long) generic6dofJointGetParam; 149 @GodotName("generic_6dof_joint_set_flag") GodotMethod!(void, RID, long, long, bool) generic6dofJointSetFlag; 150 @GodotName("generic_6dof_joint_get_flag") GodotMethod!(bool, RID, long, long) generic6dofJointGetFlag; 151 @GodotName("free_rid") GodotMethod!(void, RID) freeRid; 152 @GodotName("set_active") GodotMethod!(void, bool) setActive; 153 @GodotName("get_process_info") GodotMethod!(long, long) getProcessInfo; 154 } 155 bool opEquals(in PhysicsServerSingleton other) const { return _godot_object.ptr is other._godot_object.ptr; } 156 PhysicsServerSingleton opAssign(T : typeof(null))(T n) { _godot_object.ptr = null; } 157 bool opEquals(typeof(null) n) const { return _godot_object.ptr is null; } 158 mixin baseCasts; 159 static PhysicsServerSingleton _new() 160 { 161 static godot_class_constructor constructor; 162 if(constructor is null) constructor = _godot_api.godot_get_class_constructor("PhysicsServer"); 163 if(constructor is null) return typeof(this).init; 164 return cast(PhysicsServerSingleton)(constructor()); 165 } 166 @disable new(size_t s); 167 /// 168 enum BodyAxis : int 169 { 170 /** 171 172 */ 173 bodyAxisLinearX = 1, 174 /** 175 176 */ 177 bodyAxisLinearY = 2, 178 /** 179 180 */ 181 bodyAxisLinearZ = 4, 182 /** 183 184 */ 185 bodyAxisAngularX = 8, 186 /** 187 188 */ 189 bodyAxisAngularY = 16, 190 /** 191 192 */ 193 bodyAxisAngularZ = 32, 194 } 195 /// 196 enum ProcessInfo : int 197 { 198 /** 199 Constant to get the number of objects that are not sleeping. 200 */ 201 infoActiveObjects = 0, 202 /** 203 Constant to get the number of possible collisions. 204 */ 205 infoCollisionPairs = 1, 206 /** 207 Constant to get the number of space regions where a collision could occur. 208 */ 209 infoIslandCount = 2, 210 } 211 /// 212 enum AreaBodyStatus : int 213 { 214 /** 215 The value of the first parameter and area callback function receives, when an object enters one of its shapes. 216 */ 217 areaBodyAdded = 0, 218 /** 219 The value of the first parameter and area callback function receives, when an object exits one of its shapes. 220 */ 221 areaBodyRemoved = 1, 222 } 223 /// 224 enum BodyMode : int 225 { 226 /** 227 Constant for static bodies. 228 */ 229 bodyModeStatic = 0, 230 /** 231 Constant for kinematic bodies. 232 */ 233 bodyModeKinematic = 1, 234 /** 235 Constant for rigid bodies. 236 */ 237 bodyModeRigid = 2, 238 /** 239 Constant for rigid bodies in character mode. In this mode, a body can not rotate, and only its linear velocity is affected by physics. 240 */ 241 bodyModeCharacter = 3, 242 } 243 /// 244 enum ShapeType : int 245 { 246 /** 247 The $(D Shape) is a $(D PlaneShape). 248 */ 249 shapePlane = 0, 250 /** 251 The $(D Shape) is a $(D RayShape). 252 */ 253 shapeRay = 1, 254 /** 255 The $(D Shape) is a $(D SphereShape). 256 */ 257 shapeSphere = 2, 258 /** 259 The $(D Shape) is a $(D BoxShape). 260 */ 261 shapeBox = 3, 262 /** 263 The $(D Shape) is a $(D CapsuleShape). 264 */ 265 shapeCapsule = 4, 266 /** 267 The $(D Shape) is a $(D CylinderShape). 268 */ 269 shapeCylinder = 5, 270 /** 271 The $(D Shape) is a $(D ConvexPolygonShape). 272 */ 273 shapeConvexPolygon = 6, 274 /** 275 The $(D Shape) is a $(D ConcavePolygonShape). 276 */ 277 shapeConcavePolygon = 7, 278 /** 279 The $(D Shape) is a $(D HeightMapShape). 280 */ 281 shapeHeightmap = 8, 282 /** 283 This constant is used internally by the engine. Any attempt to create this kind of shape results in an error. 284 */ 285 shapeCustom = 9, 286 } 287 /// 288 enum PinJointParam : int 289 { 290 /** 291 The strength with which the pinned objects try to stay in positional relation to each other. 292 The higher, the stronger. 293 */ 294 pinJointBias = 0, 295 /** 296 The strength with which the pinned objects try to stay in velocity relation to each other. 297 The higher, the stronger. 298 */ 299 pinJointDamping = 1, 300 /** 301 If above 0, this value is the maximum value for an impulse that this Joint puts on its ends. 302 */ 303 pinJointImpulseClamp = 2, 304 } 305 /// 306 enum SpaceParameter : int 307 { 308 /** 309 Constant to set/get the maximum distance a pair of bodies has to move before their collision status has to be recalculated. 310 */ 311 spaceParamContactRecycleRadius = 0, 312 /** 313 Constant to set/get the maximum distance a shape can be from another before they are considered separated. 314 */ 315 spaceParamContactMaxSeparation = 1, 316 /** 317 Constant to set/get the maximum distance a shape can penetrate another shape before it is considered a collision. 318 */ 319 spaceParamBodyMaxAllowedPenetration = 2, 320 /** 321 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. 322 */ 323 spaceParamBodyLinearVelocitySleepThreshold = 3, 324 /** 325 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. 326 */ 327 spaceParamBodyAngularVelocitySleepThreshold = 4, 328 /** 329 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. 330 */ 331 spaceParamBodyTimeToSleep = 5, 332 /** 333 334 */ 335 spaceParamBodyAngularVelocityDampRatio = 6, 336 /** 337 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. 338 */ 339 spaceParamConstraintDefaultBias = 7, 340 } 341 /// 342 enum ConeTwistJointParam : int 343 { 344 /** 345 Swing is rotation from side to side, around the axis perpendicular to the twist axis. 346 The swing span defines, how much rotation will not get corrected allong the swing axis. 347 Could be defined as looseness in the $(D ConeTwistJoint). 348 If below 0.05, this behaviour is locked. Default value: `PI/4`. 349 */ 350 coneTwistJointSwingSpan = 0, 351 /** 352 Twist is the rotation around the twist axis, this value defined how far the joint can twist. 353 Twist is locked if below 0.05. 354 */ 355 coneTwistJointTwistSpan = 1, 356 /** 357 The speed with which the swing or twist will take place. 358 The higher, the faster. 359 */ 360 coneTwistJointBias = 2, 361 /** 362 The ease with which the Joint twists, if it's too low, it takes more force to twist the joint. 363 */ 364 coneTwistJointSoftness = 3, 365 /** 366 Defines, how fast the swing- and twist-speed-difference on both sides gets synced. 367 */ 368 coneTwistJointRelaxation = 4, 369 } 370 /// 371 enum JointType : int 372 { 373 /** 374 The $(D Joint) is a $(D PinJoint). 375 */ 376 jointPin = 0, 377 /** 378 The $(D Joint) is a $(D HingeJoint). 379 */ 380 jointHinge = 1, 381 /** 382 The $(D Joint) is a $(D SliderJoint). 383 */ 384 jointSlider = 2, 385 /** 386 The $(D Joint) is a $(D ConeTwistJoint). 387 */ 388 jointConeTwist = 3, 389 /** 390 The $(D Joint) is a $(D Generic6DOFJoint). 391 */ 392 joint6dof = 4, 393 } 394 /// 395 enum BodyState : int 396 { 397 /** 398 Constant to set/get the current transform matrix of the body. 399 */ 400 bodyStateTransform = 0, 401 /** 402 Constant to set/get the current linear velocity of the body. 403 */ 404 bodyStateLinearVelocity = 1, 405 /** 406 Constant to set/get the current angular velocity of the body. 407 */ 408 bodyStateAngularVelocity = 2, 409 /** 410 Constant to sleep/wake up a body, or to get whether it is sleeping. 411 */ 412 bodyStateSleeping = 3, 413 /** 414 Constant to set/get whether the body can sleep. 415 */ 416 bodyStateCanSleep = 4, 417 } 418 /// 419 enum BodyParameter : int 420 { 421 /** 422 Constant to set/get a body's bounce factor. 423 */ 424 bodyParamBounce = 0, 425 /** 426 Constant to set/get a body's friction. 427 */ 428 bodyParamFriction = 1, 429 /** 430 Constant to set/get a body's mass. 431 */ 432 bodyParamMass = 2, 433 /** 434 Constant to set/get a body's gravity multiplier. 435 */ 436 bodyParamGravityScale = 3, 437 /** 438 Constant to set/get a body's linear dampening factor. 439 */ 440 bodyParamLinearDamp = 4, 441 /** 442 Constant to set/get a body's angular dampening factor. 443 */ 444 bodyParamAngularDamp = 5, 445 /** 446 This is the last ID for body parameters. Any attempt to set this property is ignored. Any attempt to get it returns 0. 447 */ 448 bodyParamMax = 6, 449 } 450 /// 451 enum G6DOFJointAxisParam : int 452 { 453 /** 454 The minimum difference between the pivot points' axes. 455 */ 456 g6dofJointLinearLowerLimit = 0, 457 /** 458 The maximum difference between the pivot points' axes. 459 */ 460 g6dofJointLinearUpperLimit = 1, 461 /** 462 A factor that gets applied to the movement across the axes. The lower, the slower the movement. 463 */ 464 g6dofJointLinearLimitSoftness = 2, 465 /** 466 The amount of restitution on the axes movement. The lower, the more velocity-energy gets lost. 467 */ 468 g6dofJointLinearRestitution = 3, 469 /** 470 The amount of damping that happens at the linear motion across the axes. 471 */ 472 g6dofJointLinearDamping = 4, 473 /** 474 The velocity that the joint's linear motor will attempt to reach. 475 */ 476 g6dofJointLinearMotorTargetVelocity = 5, 477 /** 478 The maximum force that the linear motor can apply while trying to reach the target velocity. 479 */ 480 g6dofJointLinearMotorForceLimit = 6, 481 /** 482 The minimum rotation in negative direction to break loose and rotate around the axes. 483 */ 484 g6dofJointAngularLowerLimit = 7, 485 /** 486 The minimum rotation in positive direction to break loose and rotate around the axes. 487 */ 488 g6dofJointAngularUpperLimit = 8, 489 /** 490 A factor that gets multiplied onto all rotations across the axes. 491 */ 492 g6dofJointAngularLimitSoftness = 9, 493 /** 494 The amount of rotational damping across the axes. The lower, the more dampening occurs. 495 */ 496 g6dofJointAngularDamping = 10, 497 /** 498 The amount of rotational restitution across the axes. The lower, the more restitution occurs. 499 */ 500 g6dofJointAngularRestitution = 11, 501 /** 502 The maximum amount of force that can occur, when rotating around the axes. 503 */ 504 g6dofJointAngularForceLimit = 12, 505 /** 506 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. 507 */ 508 g6dofJointAngularErp = 13, 509 /** 510 Target speed for the motor at the axes. 511 */ 512 g6dofJointAngularMotorTargetVelocity = 14, 513 /** 514 Maximum acceleration for the motor at the axes. 515 */ 516 g6dofJointAngularMotorForceLimit = 15, 517 } 518 /// 519 enum SliderJointParam : int 520 { 521 /** 522 The maximum difference between the pivot points on their x-axis before damping happens. 523 */ 524 sliderJointLinearLimitUpper = 0, 525 /** 526 The minimum difference between the pivot points on their x-axis before damping happens. 527 */ 528 sliderJointLinearLimitLower = 1, 529 /** 530 A factor applied to the movement across the slider axis once the limits get surpassed. The lower, the slower the movement. 531 */ 532 sliderJointLinearLimitSoftness = 2, 533 /** 534 The amount of restitution once the limits are surpassed. The lower, the more velocityenergy gets lost. 535 */ 536 sliderJointLinearLimitRestitution = 3, 537 /** 538 The amount of damping once the slider limits are surpassed. 539 */ 540 sliderJointLinearLimitDamping = 4, 541 /** 542 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. 543 */ 544 sliderJointLinearMotionSoftness = 5, 545 /** 546 The amount of restitution inside the slider limits. 547 */ 548 sliderJointLinearMotionRestitution = 6, 549 /** 550 The amount of damping inside the slider limits. 551 */ 552 sliderJointLinearMotionDamping = 7, 553 /** 554 A factor applied to the movement across axes orthogonal to the slider. 555 */ 556 sliderJointLinearOrthogonalSoftness = 8, 557 /** 558 The amount of restitution when movement is across axes orthogonal to the slider. 559 */ 560 sliderJointLinearOrthogonalRestitution = 9, 561 /** 562 The amount of damping when movement is across axes orthogonal to the slider. 563 */ 564 sliderJointLinearOrthogonalDamping = 10, 565 /** 566 The upper limit of rotation in the slider. 567 */ 568 sliderJointAngularLimitUpper = 11, 569 /** 570 The lower limit of rotation in the slider. 571 */ 572 sliderJointAngularLimitLower = 12, 573 /** 574 A factor applied to the all rotation once the limit is surpassed. 575 */ 576 sliderJointAngularLimitSoftness = 13, 577 /** 578 The amount of restitution of the rotation when the limit is surpassed. 579 */ 580 sliderJointAngularLimitRestitution = 14, 581 /** 582 The amount of damping of the rotation when the limit is surpassed. 583 */ 584 sliderJointAngularLimitDamping = 15, 585 /** 586 A factor that gets applied to the all rotation in the limits. 587 */ 588 sliderJointAngularMotionSoftness = 16, 589 /** 590 The amount of restitution of the rotation in the limits. 591 */ 592 sliderJointAngularMotionRestitution = 17, 593 /** 594 The amount of damping of the rotation in the limits. 595 */ 596 sliderJointAngularMotionDamping = 18, 597 /** 598 A factor that gets applied to the all rotation across axes orthogonal to the slider. 599 */ 600 sliderJointAngularOrthogonalSoftness = 19, 601 /** 602 The amount of restitution of the rotation across axes orthogonal to the slider. 603 */ 604 sliderJointAngularOrthogonalRestitution = 20, 605 /** 606 The amount of damping of the rotation across axes orthogonal to the slider. 607 */ 608 sliderJointAngularOrthogonalDamping = 21, 609 /** 610 End flag of SLIDER_JOINT_* constants, used internally. 611 */ 612 sliderJointMax = 22, 613 } 614 /// 615 enum HingeJointParam : int 616 { 617 /** 618 The speed with which the two bodies get pulled together when they move in different directions. 619 */ 620 hingeJointBias = 0, 621 /** 622 The maximum rotation across the Hinge. 623 */ 624 hingeJointLimitUpper = 1, 625 /** 626 The minimum rotation across the Hinge. 627 */ 628 hingeJointLimitLower = 2, 629 /** 630 The speed with which the rotation across the axis perpendicular to the hinge gets corrected. 631 */ 632 hingeJointLimitBias = 3, 633 /** 634 635 */ 636 hingeJointLimitSoftness = 4, 637 /** 638 The lower this value, the more the rotation gets slowed down. 639 */ 640 hingeJointLimitRelaxation = 5, 641 /** 642 Target speed for the motor. 643 */ 644 hingeJointMotorTargetVelocity = 6, 645 /** 646 Maximum acceleration for the motor. 647 */ 648 hingeJointMotorMaxImpulse = 7, 649 } 650 /// 651 enum G6DOFJointAxisFlag : int 652 { 653 /** 654 If `set` there is linear motion possible within the given limits. 655 */ 656 g6dofJointFlagEnableLinearLimit = 0, 657 /** 658 If `set` there is rotational motion possible. 659 */ 660 g6dofJointFlagEnableAngularLimit = 1, 661 /** 662 If `set` there is a rotational motor across these axes. 663 */ 664 g6dofJointFlagEnableMotor = 2, 665 /** 666 If `set` there is a linear motor on this axis that targets a specific velocity. 667 */ 668 g6dofJointFlagEnableLinearMotor = 3, 669 } 670 /// 671 enum HingeJointFlag : int 672 { 673 /** 674 If `true` the Hinge has a maximum and a minimum rotation. 675 */ 676 hingeJointFlagUseLimit = 0, 677 /** 678 If `true` a motor turns the Hinge 679 */ 680 hingeJointFlagEnableMotor = 1, 681 } 682 /// 683 enum AreaSpaceOverrideMode : int 684 { 685 /** 686 This area does not affect gravity/damp. These are generally areas that exist only to detect collisions, and objects entering or exiting them. 687 */ 688 areaSpaceOverrideDisabled = 0, 689 /** 690 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. 691 */ 692 areaSpaceOverrideCombine = 1, 693 /** 694 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. 695 */ 696 areaSpaceOverrideCombineReplace = 2, 697 /** 698 This area replaces any gravity/damp, even the default one, and stops taking into account the rest of the areas. 699 */ 700 areaSpaceOverrideReplace = 3, 701 /** 702 This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one. 703 */ 704 areaSpaceOverrideReplaceCombine = 4, 705 } 706 /// 707 enum AreaParameter : int 708 { 709 /** 710 Constant to set/get gravity strength in an area. 711 */ 712 areaParamGravity = 0, 713 /** 714 Constant to set/get gravity vector/center in an area. 715 */ 716 areaParamGravityVector = 1, 717 /** 718 Constant to set/get whether the gravity vector of an area is a direction, or a center point. 719 */ 720 areaParamGravityIsPoint = 2, 721 /** 722 Constant to set/get the falloff factor for point gravity of an area. The greater this value is, the faster the strength of gravity decreases with the square of distance. 723 */ 724 areaParamGravityDistanceScale = 3, 725 /** 726 This constant was used to set/get the falloff factor for point gravity. It has been superseded by AREA_PARAM_GRAVITY_DISTANCE_SCALE. 727 */ 728 areaParamGravityPointAttenuation = 4, 729 /** 730 Constant to set/get the linear dampening factor of an area. 731 */ 732 areaParamLinearDamp = 5, 733 /** 734 Constant to set/get the angular dampening factor of an area. 735 */ 736 areaParamAngularDamp = 6, 737 /** 738 Constant to set/get the priority (order of processing) of an area. 739 */ 740 areaParamPriority = 7, 741 } 742 /// 743 enum Constants : int 744 { 745 infoActiveObjects = 0, 746 sliderJointLinearLimitUpper = 0, 747 hingeJointBias = 0, 748 g6dofJointLinearLowerLimit = 0, 749 jointPin = 0, 750 areaSpaceOverrideDisabled = 0, 751 shapePlane = 0, 752 bodyStateTransform = 0, 753 bodyParamBounce = 0, 754 coneTwistJointSwingSpan = 0, 755 hingeJointFlagUseLimit = 0, 756 areaParamGravity = 0, 757 pinJointBias = 0, 758 bodyModeStatic = 0, 759 spaceParamContactRecycleRadius = 0, 760 areaBodyAdded = 0, 761 g6dofJointFlagEnableLinearLimit = 0, 762 areaParamGravityVector = 1, 763 spaceParamContactMaxSeparation = 1, 764 shapeRay = 1, 765 pinJointDamping = 1, 766 hingeJointFlagEnableMotor = 1, 767 sliderJointLinearLimitLower = 1, 768 g6dofJointLinearUpperLimit = 1, 769 areaBodyRemoved = 1, 770 bodyAxisLinearX = 1, 771 bodyParamFriction = 1, 772 infoCollisionPairs = 1, 773 bodyModeKinematic = 1, 774 coneTwistJointTwistSpan = 1, 775 bodyStateLinearVelocity = 1, 776 g6dofJointFlagEnableAngularLimit = 1, 777 areaSpaceOverrideCombine = 1, 778 hingeJointLimitUpper = 1, 779 jointHinge = 1, 780 areaSpaceOverrideCombineReplace = 2, 781 shapeSphere = 2, 782 infoIslandCount = 2, 783 spaceParamBodyMaxAllowedPenetration = 2, 784 sliderJointLinearLimitSoftness = 2, 785 g6dofJointFlagEnableMotor = 2, 786 pinJointImpulseClamp = 2, 787 bodyParamMass = 2, 788 hingeJointLimitLower = 2, 789 bodyAxisLinearY = 2, 790 coneTwistJointBias = 2, 791 g6dofJointLinearLimitSoftness = 2, 792 jointSlider = 2, 793 areaParamGravityIsPoint = 2, 794 bodyModeRigid = 2, 795 bodyStateAngularVelocity = 2, 796 coneTwistJointSoftness = 3, 797 bodyParamGravityScale = 3, 798 bodyModeCharacter = 3, 799 sliderJointLinearLimitRestitution = 3, 800 areaSpaceOverrideReplace = 3, 801 jointConeTwist = 3, 802 g6dofJointFlagEnableLinearMotor = 3, 803 shapeBox = 3, 804 bodyStateSleeping = 3, 805 spaceParamBodyLinearVelocitySleepThreshold = 3, 806 areaParamGravityDistanceScale = 3, 807 g6dofJointLinearRestitution = 3, 808 hingeJointLimitBias = 3, 809 areaSpaceOverrideReplaceCombine = 4, 810 bodyParamLinearDamp = 4, 811 coneTwistJointRelaxation = 4, 812 hingeJointLimitSoftness = 4, 813 g6dofJointLinearDamping = 4, 814 spaceParamBodyAngularVelocitySleepThreshold = 4, 815 joint6dof = 4, 816 shapeCapsule = 4, 817 bodyAxisLinearZ = 4, 818 sliderJointLinearLimitDamping = 4, 819 areaParamGravityPointAttenuation = 4, 820 bodyStateCanSleep = 4, 821 bodyParamAngularDamp = 5, 822 sliderJointLinearMotionSoftness = 5, 823 areaParamLinearDamp = 5, 824 hingeJointLimitRelaxation = 5, 825 shapeCylinder = 5, 826 spaceParamBodyTimeToSleep = 5, 827 g6dofJointLinearMotorTargetVelocity = 5, 828 shapeConvexPolygon = 6, 829 sliderJointLinearMotionRestitution = 6, 830 bodyParamMax = 6, 831 g6dofJointLinearMotorForceLimit = 6, 832 spaceParamBodyAngularVelocityDampRatio = 6, 833 areaParamAngularDamp = 6, 834 hingeJointMotorTargetVelocity = 6, 835 areaParamPriority = 7, 836 g6dofJointAngularLowerLimit = 7, 837 shapeConcavePolygon = 7, 838 hingeJointMotorMaxImpulse = 7, 839 spaceParamConstraintDefaultBias = 7, 840 sliderJointLinearMotionDamping = 7, 841 shapeHeightmap = 8, 842 g6dofJointAngularUpperLimit = 8, 843 sliderJointLinearOrthogonalSoftness = 8, 844 bodyAxisAngularX = 8, 845 shapeCustom = 9, 846 sliderJointLinearOrthogonalRestitution = 9, 847 g6dofJointAngularLimitSoftness = 9, 848 g6dofJointAngularDamping = 10, 849 sliderJointLinearOrthogonalDamping = 10, 850 g6dofJointAngularRestitution = 11, 851 sliderJointAngularLimitUpper = 11, 852 g6dofJointAngularForceLimit = 12, 853 sliderJointAngularLimitLower = 12, 854 g6dofJointAngularErp = 13, 855 sliderJointAngularLimitSoftness = 13, 856 sliderJointAngularLimitRestitution = 14, 857 g6dofJointAngularMotorTargetVelocity = 14, 858 sliderJointAngularLimitDamping = 15, 859 g6dofJointAngularMotorForceLimit = 15, 860 bodyAxisAngularY = 16, 861 sliderJointAngularMotionSoftness = 16, 862 sliderJointAngularMotionRestitution = 17, 863 sliderJointAngularMotionDamping = 18, 864 sliderJointAngularOrthogonalSoftness = 19, 865 sliderJointAngularOrthogonalRestitution = 20, 866 sliderJointAngularOrthogonalDamping = 21, 867 sliderJointMax = 22, 868 bodyAxisAngularZ = 32, 869 } 870 /** 871 Creates a shape of type SHAPE_*. Does not assign it to a body or an area. To do so, you must use $(D areaSetShape) or $(D bodySetShape). 872 */ 873 RID shapeCreate(in long type) 874 { 875 checkClassBinding!(typeof(this))(); 876 return ptrcall!(RID)(_classBinding.shapeCreate, _godot_object, type); 877 } 878 /** 879 Sets the shape data that defines its shape and size. The data to be passed depends on the kind of shape created $(D shapeGetType). 880 */ 881 void shapeSetData(VariantArg1)(in RID shape, in VariantArg1 data) 882 { 883 checkClassBinding!(typeof(this))(); 884 ptrcall!(void)(_classBinding.shapeSetData, _godot_object, shape, data); 885 } 886 /** 887 Returns the type of shape (see SHAPE_* constants). 888 */ 889 PhysicsServer.ShapeType shapeGetType(in RID shape) const 890 { 891 checkClassBinding!(typeof(this))(); 892 return ptrcall!(PhysicsServer.ShapeType)(_classBinding.shapeGetType, _godot_object, shape); 893 } 894 /** 895 Returns the shape data. 896 */ 897 Variant shapeGetData(in RID shape) const 898 { 899 checkClassBinding!(typeof(this))(); 900 return ptrcall!(Variant)(_classBinding.shapeGetData, _godot_object, shape); 901 } 902 /** 903 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 $(D areaSetSpace), or to a body with $(D bodySetSpace). 904 */ 905 RID spaceCreate() 906 { 907 checkClassBinding!(typeof(this))(); 908 return ptrcall!(RID)(_classBinding.spaceCreate, _godot_object); 909 } 910 /** 911 Marks a space as active. It will not have an effect, unless it is assigned to an area or body. 912 */ 913 void spaceSetActive(in RID space, in bool active) 914 { 915 checkClassBinding!(typeof(this))(); 916 ptrcall!(void)(_classBinding.spaceSetActive, _godot_object, space, active); 917 } 918 /** 919 Returns whether the space is active. 920 */ 921 bool spaceIsActive(in RID space) const 922 { 923 checkClassBinding!(typeof(this))(); 924 return ptrcall!(bool)(_classBinding.spaceIsActive, _godot_object, space); 925 } 926 /** 927 Sets the value for a space parameter. A list of available parameters is on the SPACE_PARAM_* constants. 928 */ 929 void spaceSetParam(in RID space, in long param, in double value) 930 { 931 checkClassBinding!(typeof(this))(); 932 ptrcall!(void)(_classBinding.spaceSetParam, _godot_object, space, param, value); 933 } 934 /** 935 Returns the value of a space parameter. 936 */ 937 double spaceGetParam(in RID space, in long param) const 938 { 939 checkClassBinding!(typeof(this))(); 940 return ptrcall!(double)(_classBinding.spaceGetParam, _godot_object, space, param); 941 } 942 /** 943 Returns the state of a space, a $(D PhysicsDirectSpaceState). This object can be used to make collision/intersection queries. 944 */ 945 PhysicsDirectSpaceState spaceGetDirectState(in RID space) 946 { 947 checkClassBinding!(typeof(this))(); 948 return ptrcall!(PhysicsDirectSpaceState)(_classBinding.spaceGetDirectState, _godot_object, space); 949 } 950 /** 951 Creates an $(D Area). 952 */ 953 RID areaCreate() 954 { 955 checkClassBinding!(typeof(this))(); 956 return ptrcall!(RID)(_classBinding.areaCreate, _godot_object); 957 } 958 /** 959 Assigns a space to the area. 960 */ 961 void areaSetSpace(in RID area, in RID space) 962 { 963 checkClassBinding!(typeof(this))(); 964 ptrcall!(void)(_classBinding.areaSetSpace, _godot_object, area, space); 965 } 966 /** 967 Returns the space assigned to the area. 968 */ 969 RID areaGetSpace(in RID area) const 970 { 971 checkClassBinding!(typeof(this))(); 972 return ptrcall!(RID)(_classBinding.areaGetSpace, _godot_object, area); 973 } 974 /** 975 Sets the space override mode for the area. The modes are described in the constants AREA_SPACE_OVERRIDE_*. 976 */ 977 void areaSetSpaceOverrideMode(in RID area, in long mode) 978 { 979 checkClassBinding!(typeof(this))(); 980 ptrcall!(void)(_classBinding.areaSetSpaceOverrideMode, _godot_object, area, mode); 981 } 982 /** 983 Returns the space override mode for the area. 984 */ 985 PhysicsServer.AreaSpaceOverrideMode areaGetSpaceOverrideMode(in RID area) const 986 { 987 checkClassBinding!(typeof(this))(); 988 return ptrcall!(PhysicsServer.AreaSpaceOverrideMode)(_classBinding.areaGetSpaceOverrideMode, _godot_object, area); 989 } 990 /** 991 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. 992 */ 993 void areaAddShape(in RID area, in RID shape, in Transform transform = Transform.init) 994 { 995 checkClassBinding!(typeof(this))(); 996 ptrcall!(void)(_classBinding.areaAddShape, _godot_object, area, shape, transform); 997 } 998 /** 999 Substitutes a given area shape by another. The old shape is selected by its index, the new one by its $(D RID). 1000 */ 1001 void areaSetShape(in RID area, in long shape_idx, in RID shape) 1002 { 1003 checkClassBinding!(typeof(this))(); 1004 ptrcall!(void)(_classBinding.areaSetShape, _godot_object, area, shape_idx, shape); 1005 } 1006 /** 1007 Sets the transform matrix for an area shape. 1008 */ 1009 void areaSetShapeTransform(in RID area, in long shape_idx, in Transform transform) 1010 { 1011 checkClassBinding!(typeof(this))(); 1012 ptrcall!(void)(_classBinding.areaSetShapeTransform, _godot_object, area, shape_idx, transform); 1013 } 1014 /** 1015 Returns the number of shapes assigned to an area. 1016 */ 1017 long areaGetShapeCount(in RID area) const 1018 { 1019 checkClassBinding!(typeof(this))(); 1020 return ptrcall!(long)(_classBinding.areaGetShapeCount, _godot_object, area); 1021 } 1022 /** 1023 Returns the $(D RID) of the nth shape of an area. 1024 */ 1025 RID areaGetShape(in RID area, in long shape_idx) const 1026 { 1027 checkClassBinding!(typeof(this))(); 1028 return ptrcall!(RID)(_classBinding.areaGetShape, _godot_object, area, shape_idx); 1029 } 1030 /** 1031 Returns the transform matrix of a shape within an area. 1032 */ 1033 Transform areaGetShapeTransform(in RID area, in long shape_idx) const 1034 { 1035 checkClassBinding!(typeof(this))(); 1036 return ptrcall!(Transform)(_classBinding.areaGetShapeTransform, _godot_object, area, shape_idx); 1037 } 1038 /** 1039 Removes a shape from an area. It does not delete the shape, so it can be reassigned later. 1040 */ 1041 void areaRemoveShape(in RID area, in long shape_idx) 1042 { 1043 checkClassBinding!(typeof(this))(); 1044 ptrcall!(void)(_classBinding.areaRemoveShape, _godot_object, area, shape_idx); 1045 } 1046 /** 1047 Removes all shapes from an area. It does not delete the shapes, so they can be reassigned later. 1048 */ 1049 void areaClearShapes(in RID area) 1050 { 1051 checkClassBinding!(typeof(this))(); 1052 ptrcall!(void)(_classBinding.areaClearShapes, _godot_object, area); 1053 } 1054 /** 1055 Assigns the area to one or many physics layers. 1056 */ 1057 void areaSetCollisionLayer(in RID area, in long layer) 1058 { 1059 checkClassBinding!(typeof(this))(); 1060 ptrcall!(void)(_classBinding.areaSetCollisionLayer, _godot_object, area, layer); 1061 } 1062 /** 1063 Sets which physics layers the area will monitor. 1064 */ 1065 void areaSetCollisionMask(in RID area, in long mask) 1066 { 1067 checkClassBinding!(typeof(this))(); 1068 ptrcall!(void)(_classBinding.areaSetCollisionMask, _godot_object, area, mask); 1069 } 1070 /** 1071 Sets the value for an area parameter. A list of available parameters is on the AREA_PARAM_* constants. 1072 */ 1073 void areaSetParam(VariantArg2)(in RID area, in long param, in VariantArg2 value) 1074 { 1075 checkClassBinding!(typeof(this))(); 1076 ptrcall!(void)(_classBinding.areaSetParam, _godot_object, area, param, value); 1077 } 1078 /** 1079 Sets the transform matrix for an area. 1080 */ 1081 void areaSetTransform(in RID area, in Transform transform) 1082 { 1083 checkClassBinding!(typeof(this))(); 1084 ptrcall!(void)(_classBinding.areaSetTransform, _godot_object, area, transform); 1085 } 1086 /** 1087 Returns an area parameter value. A list of available parameters is on the AREA_PARAM_* constants. 1088 */ 1089 Variant areaGetParam(in RID area, in long param) const 1090 { 1091 checkClassBinding!(typeof(this))(); 1092 return ptrcall!(Variant)(_classBinding.areaGetParam, _godot_object, area, param); 1093 } 1094 /** 1095 Returns the transform matrix for an area. 1096 */ 1097 Transform areaGetTransform(in RID area) const 1098 { 1099 checkClassBinding!(typeof(this))(); 1100 return ptrcall!(Transform)(_classBinding.areaGetTransform, _godot_object, area); 1101 } 1102 /** 1103 Assigns the area to a descendant of $(D GodotObject), so it can exist in the node tree. 1104 */ 1105 void areaAttachObjectInstanceId(in RID area, in long id) 1106 { 1107 checkClassBinding!(typeof(this))(); 1108 ptrcall!(void)(_classBinding.areaAttachObjectInstanceId, _godot_object, area, id); 1109 } 1110 /** 1111 Gets the instance ID of the object the area is assigned to. 1112 */ 1113 long areaGetObjectInstanceId(in RID area) const 1114 { 1115 checkClassBinding!(typeof(this))(); 1116 return ptrcall!(long)(_classBinding.areaGetObjectInstanceId, _godot_object, area); 1117 } 1118 /** 1119 Sets the function to call when any body/area enters or exits the area. This callback will be called for any object interacting with the area, and takes five parameters: 1120 1: AREA_BODY_ADDED or AREA_BODY_REMOVED, depending on whether the object entered or exited the area. 1121 2: $(D RID) of the object that entered/exited the area. 1122 3: Instance ID of the object that entered/exited the area. 1123 4: The shape index of the object that entered/exited the area. 1124 5: The shape index of the area where the object entered/exited. 1125 */ 1126 void areaSetMonitorCallback(StringArg2)(in RID area, GodotObject receiver, in StringArg2 method) 1127 { 1128 checkClassBinding!(typeof(this))(); 1129 ptrcall!(void)(_classBinding.areaSetMonitorCallback, _godot_object, area, receiver, method); 1130 } 1131 /** 1132 1133 */ 1134 void areaSetAreaMonitorCallback(StringArg2)(in RID area, GodotObject receiver, in StringArg2 method) 1135 { 1136 checkClassBinding!(typeof(this))(); 1137 ptrcall!(void)(_classBinding.areaSetAreaMonitorCallback, _godot_object, area, receiver, method); 1138 } 1139 /** 1140 1141 */ 1142 void areaSetMonitorable(in RID area, in bool monitorable) 1143 { 1144 checkClassBinding!(typeof(this))(); 1145 ptrcall!(void)(_classBinding.areaSetMonitorable, _godot_object, area, monitorable); 1146 } 1147 /** 1148 Sets object pickable with rays. 1149 */ 1150 void areaSetRayPickable(in RID area, in bool enable) 1151 { 1152 checkClassBinding!(typeof(this))(); 1153 ptrcall!(void)(_classBinding.areaSetRayPickable, _godot_object, area, enable); 1154 } 1155 /** 1156 If `true` area collides with rays. 1157 */ 1158 bool areaIsRayPickable(in RID area) const 1159 { 1160 checkClassBinding!(typeof(this))(); 1161 return ptrcall!(bool)(_classBinding.areaIsRayPickable, _godot_object, area); 1162 } 1163 /** 1164 Creates a physics body. The first parameter can be any value from constants BODY_MODE*, for the type of body created. Additionally, the body can be created in sleeping state to save processing time. 1165 */ 1166 RID bodyCreate(in long mode = 2, in bool init_sleeping = false) 1167 { 1168 checkClassBinding!(typeof(this))(); 1169 return ptrcall!(RID)(_classBinding.bodyCreate, _godot_object, mode, init_sleeping); 1170 } 1171 /** 1172 Assigns a space to the body (see $(D createSpace)). 1173 */ 1174 void bodySetSpace(in RID _body, in RID space) 1175 { 1176 checkClassBinding!(typeof(this))(); 1177 ptrcall!(void)(_classBinding.bodySetSpace, _godot_object, _body, space); 1178 } 1179 /** 1180 Returns the $(D RID) of the space assigned to a body. 1181 */ 1182 RID bodyGetSpace(in RID _body) const 1183 { 1184 checkClassBinding!(typeof(this))(); 1185 return ptrcall!(RID)(_classBinding.bodyGetSpace, _godot_object, _body); 1186 } 1187 /** 1188 Sets the body mode, from one of the constants BODY_MODE*. 1189 */ 1190 void bodySetMode(in RID _body, in long mode) 1191 { 1192 checkClassBinding!(typeof(this))(); 1193 ptrcall!(void)(_classBinding.bodySetMode, _godot_object, _body, mode); 1194 } 1195 /** 1196 Returns the body mode. 1197 */ 1198 PhysicsServer.BodyMode bodyGetMode(in RID _body) const 1199 { 1200 checkClassBinding!(typeof(this))(); 1201 return ptrcall!(PhysicsServer.BodyMode)(_classBinding.bodyGetMode, _godot_object, _body); 1202 } 1203 /** 1204 Sets the physics layer or layers a body belongs to. 1205 */ 1206 void bodySetCollisionLayer(in RID _body, in long layer) 1207 { 1208 checkClassBinding!(typeof(this))(); 1209 ptrcall!(void)(_classBinding.bodySetCollisionLayer, _godot_object, _body, layer); 1210 } 1211 /** 1212 Returns the physics layer or layers a body belongs to. 1213 */ 1214 long bodyGetCollisionLayer(in RID _body) const 1215 { 1216 checkClassBinding!(typeof(this))(); 1217 return ptrcall!(long)(_classBinding.bodyGetCollisionLayer, _godot_object, _body); 1218 } 1219 /** 1220 Sets the physics layer or layers a body can collide with. 1221 */ 1222 void bodySetCollisionMask(in RID _body, in long mask) 1223 { 1224 checkClassBinding!(typeof(this))(); 1225 ptrcall!(void)(_classBinding.bodySetCollisionMask, _godot_object, _body, mask); 1226 } 1227 /** 1228 Returns the physics layer or layers a body can collide with. 1229 - 1230 */ 1231 long bodyGetCollisionMask(in RID _body) const 1232 { 1233 checkClassBinding!(typeof(this))(); 1234 return ptrcall!(long)(_classBinding.bodyGetCollisionMask, _godot_object, _body); 1235 } 1236 /** 1237 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. 1238 */ 1239 void bodyAddShape(in RID _body, in RID shape, in Transform transform = Transform.init) 1240 { 1241 checkClassBinding!(typeof(this))(); 1242 ptrcall!(void)(_classBinding.bodyAddShape, _godot_object, _body, shape, transform); 1243 } 1244 /** 1245 Substitutes a given body shape by another. The old shape is selected by its index, the new one by its $(D RID). 1246 */ 1247 void bodySetShape(in RID _body, in long shape_idx, in RID shape) 1248 { 1249 checkClassBinding!(typeof(this))(); 1250 ptrcall!(void)(_classBinding.bodySetShape, _godot_object, _body, shape_idx, shape); 1251 } 1252 /** 1253 Sets the transform matrix for a body shape. 1254 */ 1255 void bodySetShapeTransform(in RID _body, in long shape_idx, in Transform transform) 1256 { 1257 checkClassBinding!(typeof(this))(); 1258 ptrcall!(void)(_classBinding.bodySetShapeTransform, _godot_object, _body, shape_idx, transform); 1259 } 1260 /** 1261 Returns the number of shapes assigned to a body. 1262 */ 1263 long bodyGetShapeCount(in RID _body) const 1264 { 1265 checkClassBinding!(typeof(this))(); 1266 return ptrcall!(long)(_classBinding.bodyGetShapeCount, _godot_object, _body); 1267 } 1268 /** 1269 Returns the $(D RID) of the nth shape of a body. 1270 */ 1271 RID bodyGetShape(in RID _body, in long shape_idx) const 1272 { 1273 checkClassBinding!(typeof(this))(); 1274 return ptrcall!(RID)(_classBinding.bodyGetShape, _godot_object, _body, shape_idx); 1275 } 1276 /** 1277 Returns the transform matrix of a body shape. 1278 */ 1279 Transform bodyGetShapeTransform(in RID _body, in long shape_idx) const 1280 { 1281 checkClassBinding!(typeof(this))(); 1282 return ptrcall!(Transform)(_classBinding.bodyGetShapeTransform, _godot_object, _body, shape_idx); 1283 } 1284 /** 1285 Removes a shape from a body. The shape is not deleted, so it can be reused afterwards. 1286 */ 1287 void bodyRemoveShape(in RID _body, in long shape_idx) 1288 { 1289 checkClassBinding!(typeof(this))(); 1290 ptrcall!(void)(_classBinding.bodyRemoveShape, _godot_object, _body, shape_idx); 1291 } 1292 /** 1293 Removes all shapes from a body. 1294 */ 1295 void bodyClearShapes(in RID _body) 1296 { 1297 checkClassBinding!(typeof(this))(); 1298 ptrcall!(void)(_classBinding.bodyClearShapes, _godot_object, _body); 1299 } 1300 /** 1301 Assigns the area to a descendant of $(D GodotObject), so it can exist in the node tree. 1302 */ 1303 void bodyAttachObjectInstanceId(in RID _body, in long id) 1304 { 1305 checkClassBinding!(typeof(this))(); 1306 ptrcall!(void)(_classBinding.bodyAttachObjectInstanceId, _godot_object, _body, id); 1307 } 1308 /** 1309 Gets the instance ID of the object the area is assigned to. 1310 */ 1311 long bodyGetObjectInstanceId(in RID _body) const 1312 { 1313 checkClassBinding!(typeof(this))(); 1314 return ptrcall!(long)(_classBinding.bodyGetObjectInstanceId, _godot_object, _body); 1315 } 1316 /** 1317 If `true` the continuous collision detection mode is enabled. 1318 Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. 1319 */ 1320 void bodySetEnableContinuousCollisionDetection(in RID _body, in bool enable) 1321 { 1322 checkClassBinding!(typeof(this))(); 1323 ptrcall!(void)(_classBinding.bodySetEnableContinuousCollisionDetection, _godot_object, _body, enable); 1324 } 1325 /** 1326 If `true` the continuous collision detection mode is enabled. 1327 */ 1328 bool bodyIsContinuousCollisionDetectionEnabled(in RID _body) const 1329 { 1330 checkClassBinding!(typeof(this))(); 1331 return ptrcall!(bool)(_classBinding.bodyIsContinuousCollisionDetectionEnabled, _godot_object, _body); 1332 } 1333 /** 1334 Sets a body parameter. A list of available parameters is on the BODY_PARAM_* constants. 1335 */ 1336 void bodySetParam(in RID _body, in long param, in double value) 1337 { 1338 checkClassBinding!(typeof(this))(); 1339 ptrcall!(void)(_classBinding.bodySetParam, _godot_object, _body, param, value); 1340 } 1341 /** 1342 Returns the value of a body parameter. A list of available parameters is on the BODY_PARAM_* constants. 1343 */ 1344 double bodyGetParam(in RID _body, in long param) const 1345 { 1346 checkClassBinding!(typeof(this))(); 1347 return ptrcall!(double)(_classBinding.bodyGetParam, _godot_object, _body, param); 1348 } 1349 /** 1350 1351 */ 1352 void bodySetKinematicSafeMargin(in RID _body, in double margin) 1353 { 1354 checkClassBinding!(typeof(this))(); 1355 ptrcall!(void)(_classBinding.bodySetKinematicSafeMargin, _godot_object, _body, margin); 1356 } 1357 /** 1358 1359 */ 1360 double bodyGetKinematicSafeMargin(in RID _body) const 1361 { 1362 checkClassBinding!(typeof(this))(); 1363 return ptrcall!(double)(_classBinding.bodyGetKinematicSafeMargin, _godot_object, _body); 1364 } 1365 /** 1366 Sets a body state (see BODY_STATE* constants). 1367 */ 1368 void bodySetState(VariantArg2)(in RID _body, in long state, in VariantArg2 value) 1369 { 1370 checkClassBinding!(typeof(this))(); 1371 ptrcall!(void)(_classBinding.bodySetState, _godot_object, _body, state, value); 1372 } 1373 /** 1374 Returns a body state. 1375 */ 1376 Variant bodyGetState(in RID _body, in long state) const 1377 { 1378 checkClassBinding!(typeof(this))(); 1379 return ptrcall!(Variant)(_classBinding.bodyGetState, _godot_object, _body, state); 1380 } 1381 /** 1382 1383 */ 1384 void bodyAddCentralForce(in RID _body, in Vector3 force) 1385 { 1386 checkClassBinding!(typeof(this))(); 1387 ptrcall!(void)(_classBinding.bodyAddCentralForce, _godot_object, _body, force); 1388 } 1389 /** 1390 1391 */ 1392 void bodyAddForce(in RID _body, in Vector3 force, in Vector3 position) 1393 { 1394 checkClassBinding!(typeof(this))(); 1395 ptrcall!(void)(_classBinding.bodyAddForce, _godot_object, _body, force, position); 1396 } 1397 /** 1398 1399 */ 1400 void bodyAddTorque(in RID _body, in Vector3 torque) 1401 { 1402 checkClassBinding!(typeof(this))(); 1403 ptrcall!(void)(_classBinding.bodyAddTorque, _godot_object, _body, torque); 1404 } 1405 /** 1406 1407 */ 1408 void bodyApplyCentralImpulse(in RID _body, in Vector3 impulse) 1409 { 1410 checkClassBinding!(typeof(this))(); 1411 ptrcall!(void)(_classBinding.bodyApplyCentralImpulse, _godot_object, _body, impulse); 1412 } 1413 /** 1414 Gives the body a push at a `position` in the direction of the `impulse`. 1415 */ 1416 void bodyApplyImpulse(in RID _body, in Vector3 position, in Vector3 impulse) 1417 { 1418 checkClassBinding!(typeof(this))(); 1419 ptrcall!(void)(_classBinding.bodyApplyImpulse, _godot_object, _body, position, impulse); 1420 } 1421 /** 1422 Gives the body a push to rotate it. 1423 */ 1424 void bodyApplyTorqueImpulse(in RID _body, in Vector3 impulse) 1425 { 1426 checkClassBinding!(typeof(this))(); 1427 ptrcall!(void)(_classBinding.bodyApplyTorqueImpulse, _godot_object, _body, impulse); 1428 } 1429 /** 1430 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. 1431 */ 1432 void bodySetAxisVelocity(in RID _body, in Vector3 axis_velocity) 1433 { 1434 checkClassBinding!(typeof(this))(); 1435 ptrcall!(void)(_classBinding.bodySetAxisVelocity, _godot_object, _body, axis_velocity); 1436 } 1437 /** 1438 1439 */ 1440 void bodySetAxisLock(in RID _body, in long axis, in bool lock) 1441 { 1442 checkClassBinding!(typeof(this))(); 1443 ptrcall!(void)(_classBinding.bodySetAxisLock, _godot_object, _body, axis, lock); 1444 } 1445 /** 1446 1447 */ 1448 bool bodyIsAxisLocked(in RID _body, in long axis) const 1449 { 1450 checkClassBinding!(typeof(this))(); 1451 return ptrcall!(bool)(_classBinding.bodyIsAxisLocked, _godot_object, _body, axis); 1452 } 1453 /** 1454 Adds a body to the list of bodies exempt from collisions. 1455 */ 1456 void bodyAddCollisionException(in RID _body, in RID excepted_body) 1457 { 1458 checkClassBinding!(typeof(this))(); 1459 ptrcall!(void)(_classBinding.bodyAddCollisionException, _godot_object, _body, excepted_body); 1460 } 1461 /** 1462 Removes a body from the list of bodies exempt from collisions. 1463 Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. 1464 */ 1465 void bodyRemoveCollisionException(in RID _body, in RID excepted_body) 1466 { 1467 checkClassBinding!(typeof(this))(); 1468 ptrcall!(void)(_classBinding.bodyRemoveCollisionException, _godot_object, _body, excepted_body); 1469 } 1470 /** 1471 Sets the maximum contacts to report. Bodies can keep a log of the contacts with other bodies, this is enabled by setting the maximum amount of contacts reported to a number greater than 0. 1472 */ 1473 void bodySetMaxContactsReported(in RID _body, in long amount) 1474 { 1475 checkClassBinding!(typeof(this))(); 1476 ptrcall!(void)(_classBinding.bodySetMaxContactsReported, _godot_object, _body, amount); 1477 } 1478 /** 1479 Returns the maximum contacts that can be reported. See $(D bodySetMaxContactsReported). 1480 */ 1481 long bodyGetMaxContactsReported(in RID _body) const 1482 { 1483 checkClassBinding!(typeof(this))(); 1484 return ptrcall!(long)(_classBinding.bodyGetMaxContactsReported, _godot_object, _body); 1485 } 1486 /** 1487 Sets whether a body uses a callback function to calculate its own physics (see $(D bodySetForceIntegrationCallback)). 1488 */ 1489 void bodySetOmitForceIntegration(in RID _body, in bool enable) 1490 { 1491 checkClassBinding!(typeof(this))(); 1492 ptrcall!(void)(_classBinding.bodySetOmitForceIntegration, _godot_object, _body, enable); 1493 } 1494 /** 1495 Returns whether a body uses a callback function to calculate its own physics (see $(D bodySetForceIntegrationCallback)). 1496 */ 1497 bool bodyIsOmittingForceIntegration(in RID _body) const 1498 { 1499 checkClassBinding!(typeof(this))(); 1500 return ptrcall!(bool)(_classBinding.bodyIsOmittingForceIntegration, _godot_object, _body); 1501 } 1502 /** 1503 Sets the function used to calculate physics for an object, if that object allows it (see $(D bodySetOmitForceIntegration)). 1504 */ 1505 void bodySetForceIntegrationCallback(StringArg2, VariantArg3)(in RID _body, GodotObject receiver, in StringArg2 method, in VariantArg3 userdata = Variant.nil) 1506 { 1507 checkClassBinding!(typeof(this))(); 1508 ptrcall!(void)(_classBinding.bodySetForceIntegrationCallback, _godot_object, _body, receiver, method, userdata); 1509 } 1510 /** 1511 Sets the body pickable with rays if `enabled` is set. 1512 */ 1513 void bodySetRayPickable(in RID _body, in bool enable) 1514 { 1515 checkClassBinding!(typeof(this))(); 1516 ptrcall!(void)(_classBinding.bodySetRayPickable, _godot_object, _body, enable); 1517 } 1518 /** 1519 If `true` the body can be detected by rays 1520 */ 1521 bool bodyIsRayPickable(in RID _body) const 1522 { 1523 checkClassBinding!(typeof(this))(); 1524 return ptrcall!(bool)(_classBinding.bodyIsRayPickable, _godot_object, _body); 1525 } 1526 /** 1527 Returns the $(D PhysicsDirectBodyState) of the body. 1528 */ 1529 PhysicsDirectBodyState bodyGetDirectState(in RID _body) 1530 { 1531 checkClassBinding!(typeof(this))(); 1532 return ptrcall!(PhysicsDirectBodyState)(_classBinding.bodyGetDirectState, _godot_object, _body); 1533 } 1534 /** 1535 Creates a $(D PinJoint). 1536 */ 1537 RID jointCreatePin(in RID body_A, in Vector3 local_A, in RID body_B, in Vector3 local_B) 1538 { 1539 checkClassBinding!(typeof(this))(); 1540 return ptrcall!(RID)(_classBinding.jointCreatePin, _godot_object, body_A, local_A, body_B, local_B); 1541 } 1542 /** 1543 Sets a pin_joint parameter (see PIN_JOINT* constants). 1544 */ 1545 void pinJointSetParam(in RID joint, in long param, in double value) 1546 { 1547 checkClassBinding!(typeof(this))(); 1548 ptrcall!(void)(_classBinding.pinJointSetParam, _godot_object, joint, param, value); 1549 } 1550 /** 1551 Gets a pin_joint parameter (see PIN_JOINT* constants). 1552 */ 1553 double pinJointGetParam(in RID joint, in long param) const 1554 { 1555 checkClassBinding!(typeof(this))(); 1556 return ptrcall!(double)(_classBinding.pinJointGetParam, _godot_object, joint, param); 1557 } 1558 /** 1559 Sets position of the joint in the local space of body a of the joint. 1560 */ 1561 void pinJointSetLocalA(in RID joint, in Vector3 local_A) 1562 { 1563 checkClassBinding!(typeof(this))(); 1564 ptrcall!(void)(_classBinding.pinJointSetLocalA, _godot_object, joint, local_A); 1565 } 1566 /** 1567 Returns position of the joint in the local space of body a of the joint. 1568 */ 1569 Vector3 pinJointGetLocalA(in RID joint) const 1570 { 1571 checkClassBinding!(typeof(this))(); 1572 return ptrcall!(Vector3)(_classBinding.pinJointGetLocalA, _godot_object, joint); 1573 } 1574 /** 1575 Sets position of the joint in the local space of body b of the joint. 1576 */ 1577 void pinJointSetLocalB(in RID joint, in Vector3 local_B) 1578 { 1579 checkClassBinding!(typeof(this))(); 1580 ptrcall!(void)(_classBinding.pinJointSetLocalB, _godot_object, joint, local_B); 1581 } 1582 /** 1583 Returns position of the joint in the local space of body b of the joint. 1584 */ 1585 Vector3 pinJointGetLocalB(in RID joint) const 1586 { 1587 checkClassBinding!(typeof(this))(); 1588 return ptrcall!(Vector3)(_classBinding.pinJointGetLocalB, _godot_object, joint); 1589 } 1590 /** 1591 Creates a $(D HingeJoint). 1592 */ 1593 RID jointCreateHinge(in RID body_A, in Transform hinge_A, in RID body_B, in Transform hinge_B) 1594 { 1595 checkClassBinding!(typeof(this))(); 1596 return ptrcall!(RID)(_classBinding.jointCreateHinge, _godot_object, body_A, hinge_A, body_B, hinge_B); 1597 } 1598 /** 1599 Sets a hinge_joint parameter (see HINGE_JOINT* constants without the HINGE_JOINT_FLAG*). 1600 */ 1601 void hingeJointSetParam(in RID joint, in long param, in double value) 1602 { 1603 checkClassBinding!(typeof(this))(); 1604 ptrcall!(void)(_classBinding.hingeJointSetParam, _godot_object, joint, param, value); 1605 } 1606 /** 1607 Gets a hinge_joint parameter (see HINGE_JOINT* constants without the HINGE_JOINT_FLAG*). 1608 */ 1609 double hingeJointGetParam(in RID joint, in long param) const 1610 { 1611 checkClassBinding!(typeof(this))(); 1612 return ptrcall!(double)(_classBinding.hingeJointGetParam, _godot_object, joint, param); 1613 } 1614 /** 1615 Sets a hinge_joint flag (see HINGE_JOINT_FLAG* constants). 1616 */ 1617 void hingeJointSetFlag(in RID joint, in long flag, in bool enabled) 1618 { 1619 checkClassBinding!(typeof(this))(); 1620 ptrcall!(void)(_classBinding.hingeJointSetFlag, _godot_object, joint, flag, enabled); 1621 } 1622 /** 1623 Gets a hinge_joint flag (see HINGE_JOINT_FLAG* constants). 1624 */ 1625 bool hingeJointGetFlag(in RID joint, in long flag) const 1626 { 1627 checkClassBinding!(typeof(this))(); 1628 return ptrcall!(bool)(_classBinding.hingeJointGetFlag, _godot_object, joint, flag); 1629 } 1630 /** 1631 Creates a $(D SliderJoint). 1632 */ 1633 RID jointCreateSlider(in RID body_A, in Transform local_ref_A, in RID body_B, in Transform local_ref_B) 1634 { 1635 checkClassBinding!(typeof(this))(); 1636 return ptrcall!(RID)(_classBinding.jointCreateSlider, _godot_object, body_A, local_ref_A, body_B, local_ref_B); 1637 } 1638 /** 1639 Gets a slider_joint parameter (see SLIDER_JOINT* constants). 1640 */ 1641 void sliderJointSetParam(in RID joint, in long param, in double value) 1642 { 1643 checkClassBinding!(typeof(this))(); 1644 ptrcall!(void)(_classBinding.sliderJointSetParam, _godot_object, joint, param, value); 1645 } 1646 /** 1647 Gets a slider_joint parameter (see SLIDER_JOINT* constants). 1648 */ 1649 double sliderJointGetParam(in RID joint, in long param) const 1650 { 1651 checkClassBinding!(typeof(this))(); 1652 return ptrcall!(double)(_classBinding.sliderJointGetParam, _godot_object, joint, param); 1653 } 1654 /** 1655 Creates a $(D ConeTwistJoint). 1656 */ 1657 RID jointCreateConeTwist(in RID body_A, in Transform local_ref_A, in RID body_B, in Transform local_ref_B) 1658 { 1659 checkClassBinding!(typeof(this))(); 1660 return ptrcall!(RID)(_classBinding.jointCreateConeTwist, _godot_object, body_A, local_ref_A, body_B, local_ref_B); 1661 } 1662 /** 1663 Sets a cone_twist_joint parameter (see CONE_TWIST_JOINT* constants). 1664 */ 1665 void coneTwistJointSetParam(in RID joint, in long param, in double value) 1666 { 1667 checkClassBinding!(typeof(this))(); 1668 ptrcall!(void)(_classBinding.coneTwistJointSetParam, _godot_object, joint, param, value); 1669 } 1670 /** 1671 Gets a cone_twist_joint parameter (see CONE_TWIST_JOINT* constants). 1672 */ 1673 double coneTwistJointGetParam(in RID joint, in long param) const 1674 { 1675 checkClassBinding!(typeof(this))(); 1676 return ptrcall!(double)(_classBinding.coneTwistJointGetParam, _godot_object, joint, param); 1677 } 1678 /** 1679 Returns the type of the Joint. 1680 */ 1681 PhysicsServer.JointType jointGetType(in RID joint) const 1682 { 1683 checkClassBinding!(typeof(this))(); 1684 return ptrcall!(PhysicsServer.JointType)(_classBinding.jointGetType, _godot_object, joint); 1685 } 1686 /** 1687 Sets the priority value of the Joint. 1688 */ 1689 void jointSetSolverPriority(in RID joint, in long priority) 1690 { 1691 checkClassBinding!(typeof(this))(); 1692 ptrcall!(void)(_classBinding.jointSetSolverPriority, _godot_object, joint, priority); 1693 } 1694 /** 1695 Gets the priority value of the Joint. 1696 */ 1697 long jointGetSolverPriority(in RID joint) const 1698 { 1699 checkClassBinding!(typeof(this))(); 1700 return ptrcall!(long)(_classBinding.jointGetSolverPriority, _godot_object, joint); 1701 } 1702 /** 1703 Creates a $(D Generic6DOFJoint). 1704 */ 1705 RID jointCreateGeneric6dof(in RID body_A, in Transform local_ref_A, in RID body_B, in Transform local_ref_B) 1706 { 1707 checkClassBinding!(typeof(this))(); 1708 return ptrcall!(RID)(_classBinding.jointCreateGeneric6dof, _godot_object, body_A, local_ref_A, body_B, local_ref_B); 1709 } 1710 /** 1711 Sets a generic_6_DOF_joint parameter (see G6DOF_JOINT* constants without the G6DOF_JOINT_FLAG*). 1712 */ 1713 void generic6dofJointSetParam(in RID joint, in long axis, in long param, in double value) 1714 { 1715 checkClassBinding!(typeof(this))(); 1716 ptrcall!(void)(_classBinding.generic6dofJointSetParam, _godot_object, joint, axis, param, value); 1717 } 1718 /** 1719 Gets a generic_6_DOF_joint parameter (see G6DOF_JOINT* constants without the G6DOF_JOINT_FLAG*). 1720 */ 1721 double generic6dofJointGetParam(in RID joint, in long axis, in long param) 1722 { 1723 checkClassBinding!(typeof(this))(); 1724 return ptrcall!(double)(_classBinding.generic6dofJointGetParam, _godot_object, joint, axis, param); 1725 } 1726 /** 1727 Sets a generic_6_DOF_joint flag (see G6DOF_JOINT_FLAG* constants). 1728 */ 1729 void generic6dofJointSetFlag(in RID joint, in long axis, in long flag, in bool enable) 1730 { 1731 checkClassBinding!(typeof(this))(); 1732 ptrcall!(void)(_classBinding.generic6dofJointSetFlag, _godot_object, joint, axis, flag, enable); 1733 } 1734 /** 1735 Gets a generic_6_DOF_joint flag (see G6DOF_JOINT_FLAG* constants). 1736 */ 1737 bool generic6dofJointGetFlag(in RID joint, in long axis, in long flag) 1738 { 1739 checkClassBinding!(typeof(this))(); 1740 return ptrcall!(bool)(_classBinding.generic6dofJointGetFlag, _godot_object, joint, axis, flag); 1741 } 1742 /** 1743 Destroys any of the objects created by PhysicsServer. If the $(D RID) passed is not one of the objects that can be created by PhysicsServer, an error will be sent to the console. 1744 */ 1745 void freeRid(in RID rid) 1746 { 1747 checkClassBinding!(typeof(this))(); 1748 ptrcall!(void)(_classBinding.freeRid, _godot_object, rid); 1749 } 1750 /** 1751 Activates or deactivates the 3D physics engine. 1752 */ 1753 void setActive(in bool active) 1754 { 1755 checkClassBinding!(typeof(this))(); 1756 ptrcall!(void)(_classBinding.setActive, _godot_object, active); 1757 } 1758 /** 1759 Returns an Info defined by the $(D ProcessInfo) input given. 1760 */ 1761 long getProcessInfo(in long process_info) 1762 { 1763 checkClassBinding!(typeof(this))(); 1764 return ptrcall!(long)(_classBinding.getProcessInfo, _godot_object, process_info); 1765 } 1766 } 1767 /// Returns: the PhysicsServerSingleton 1768 @property @nogc nothrow pragma(inline, true) 1769 PhysicsServerSingleton PhysicsServer() 1770 { 1771 checkClassBinding!PhysicsServerSingleton(); 1772 return PhysicsServerSingleton(PhysicsServerSingleton._classBinding._singleton); 1773 }