#include "godot_physics_server_3d.h"
#include "godot_body_direct_state_3d.h"
#include "godot_broad_phase_3d_bvh.h"
#include "joints/godot_cone_twist_joint_3d.h"
#include "joints/godot_generic_6dof_joint_3d.h"
#include "joints/godot_hinge_joint_3d.h"
#include "joints/godot_pin_joint_3d.h"
#include "joints/godot_slider_joint_3d.h"
#include "core/debugger/engine_debugger.h"
#include "core/os/os.h"
#define FLUSH_QUERY_CHECK(m_object) …
RID GodotPhysicsServer3D::world_boundary_shape_create() { … }
RID GodotPhysicsServer3D::separation_ray_shape_create() { … }
RID GodotPhysicsServer3D::sphere_shape_create() { … }
RID GodotPhysicsServer3D::box_shape_create() { … }
RID GodotPhysicsServer3D::capsule_shape_create() { … }
RID GodotPhysicsServer3D::cylinder_shape_create() { … }
RID GodotPhysicsServer3D::convex_polygon_shape_create() { … }
RID GodotPhysicsServer3D::concave_polygon_shape_create() { … }
RID GodotPhysicsServer3D::heightmap_shape_create() { … }
RID GodotPhysicsServer3D::custom_shape_create() { … }
void GodotPhysicsServer3D::shape_set_data(RID p_shape, const Variant &p_data) {
GodotShape3D *shape = shape_owner.get_or_null(p_shape);
ERR_FAIL_NULL(shape);
shape->set_data(p_data);
};
void GodotPhysicsServer3D::shape_set_custom_solver_bias(RID p_shape, real_t p_bias) { … }
PhysicsServer3D::ShapeType GodotPhysicsServer3D::shape_get_type(RID p_shape) const {
const GodotShape3D *shape = shape_owner.get_or_null(p_shape);
ERR_FAIL_NULL_V(shape, SHAPE_CUSTOM);
return shape->get_type();
};
Variant GodotPhysicsServer3D::shape_get_data(RID p_shape) const {
const GodotShape3D *shape = shape_owner.get_or_null(p_shape);
ERR_FAIL_NULL_V(shape, Variant());
ERR_FAIL_COND_V(!shape->is_configured(), Variant());
return shape->get_data();
};
void GodotPhysicsServer3D::shape_set_margin(RID p_shape, real_t p_margin) { … }
real_t GodotPhysicsServer3D::shape_get_margin(RID p_shape) const { … }
real_t GodotPhysicsServer3D::shape_get_custom_solver_bias(RID p_shape) const { … }
RID GodotPhysicsServer3D::space_create() {
GodotSpace3D *space = memnew(GodotSpace3D);
RID id = space_owner.make_rid(space);
space->set_self(id);
RID area_id = area_create();
GodotArea3D *area = area_owner.get_or_null(area_id);
ERR_FAIL_NULL_V(area, RID());
space->set_default_area(area);
area->set_space(space);
area->set_priority(-1);
RID sgb = body_create();
body_set_space(sgb, id);
body_set_mode(sgb, BODY_MODE_STATIC);
space->set_static_global_body(sgb);
return id;
};
void GodotPhysicsServer3D::space_set_active(RID p_space, bool p_active) { … }
bool GodotPhysicsServer3D::space_is_active(RID p_space) const { … }
void GodotPhysicsServer3D::space_set_param(RID p_space, SpaceParameter p_param, real_t p_value) { … }
real_t GodotPhysicsServer3D::space_get_param(RID p_space, SpaceParameter p_param) const { … }
PhysicsDirectSpaceState3D *GodotPhysicsServer3D::space_get_direct_state(RID p_space) { … }
void GodotPhysicsServer3D::space_set_debug_contacts(RID p_space, int p_max_contacts) { … }
Vector<Vector3> GodotPhysicsServer3D::space_get_contacts(RID p_space) const { … }
int GodotPhysicsServer3D::space_get_contact_count(RID p_space) const { … }
RID GodotPhysicsServer3D::area_create() { … }
void GodotPhysicsServer3D::area_set_space(RID p_area, RID p_space) { … }
RID GodotPhysicsServer3D::area_get_space(RID p_area) const { … }
void GodotPhysicsServer3D::area_add_shape(RID p_area, RID p_shape, const Transform3D &p_transform, bool p_disabled) { … }
void GodotPhysicsServer3D::area_set_shape(RID p_area, int p_shape_idx, RID p_shape) { … }
void GodotPhysicsServer3D::area_set_shape_transform(RID p_area, int p_shape_idx, const Transform3D &p_transform) { … }
int GodotPhysicsServer3D::area_get_shape_count(RID p_area) const { … }
RID GodotPhysicsServer3D::area_get_shape(RID p_area, int p_shape_idx) const { … }
Transform3D GodotPhysicsServer3D::area_get_shape_transform(RID p_area, int p_shape_idx) const { … }
void GodotPhysicsServer3D::area_remove_shape(RID p_area, int p_shape_idx) { … }
void GodotPhysicsServer3D::area_clear_shapes(RID p_area) { … }
void GodotPhysicsServer3D::area_set_shape_disabled(RID p_area, int p_shape_idx, bool p_disabled) { … }
void GodotPhysicsServer3D::area_attach_object_instance_id(RID p_area, ObjectID p_id) { … }
ObjectID GodotPhysicsServer3D::area_get_object_instance_id(RID p_area) const { … }
void GodotPhysicsServer3D::area_set_param(RID p_area, AreaParameter p_param, const Variant &p_value) {
if (space_owner.owns(p_area)) {
GodotSpace3D *space = space_owner.get_or_null(p_area);
p_area = space->get_default_area()->get_self();
}
GodotArea3D *area = area_owner.get_or_null(p_area);
ERR_FAIL_NULL(area);
area->set_param(p_param, p_value);
};
void GodotPhysicsServer3D::area_set_transform(RID p_area, const Transform3D &p_transform) {
GodotArea3D *area = area_owner.get_or_null(p_area);
ERR_FAIL_NULL(area);
area->set_transform(p_transform);
};
Variant GodotPhysicsServer3D::area_get_param(RID p_area, AreaParameter p_param) const {
if (space_owner.owns(p_area)) {
GodotSpace3D *space = space_owner.get_or_null(p_area);
p_area = space->get_default_area()->get_self();
}
GodotArea3D *area = area_owner.get_or_null(p_area);
ERR_FAIL_NULL_V(area, Variant());
return area->get_param(p_param);
};
Transform3D GodotPhysicsServer3D::area_get_transform(RID p_area) const {
GodotArea3D *area = area_owner.get_or_null(p_area);
ERR_FAIL_NULL_V(area, Transform3D());
return area->get_transform();
};
void GodotPhysicsServer3D::area_set_collision_layer(RID p_area, uint32_t p_layer) { … }
uint32_t GodotPhysicsServer3D::area_get_collision_layer(RID p_area) const { … }
void GodotPhysicsServer3D::area_set_collision_mask(RID p_area, uint32_t p_mask) { … }
uint32_t GodotPhysicsServer3D::area_get_collision_mask(RID p_area) const { … }
void GodotPhysicsServer3D::area_set_monitorable(RID p_area, bool p_monitorable) { … }
void GodotPhysicsServer3D::area_set_monitor_callback(RID p_area, const Callable &p_callback) { … }
void GodotPhysicsServer3D::area_set_ray_pickable(RID p_area, bool p_enable) { … }
void GodotPhysicsServer3D::area_set_area_monitor_callback(RID p_area, const Callable &p_callback) { … }
RID GodotPhysicsServer3D::body_create() {
GodotBody3D *body = memnew(GodotBody3D);
RID rid = body_owner.make_rid(body);
body->set_self(rid);
return rid;
};
void GodotPhysicsServer3D::body_set_space(RID p_body, RID p_space) {
GodotBody3D *body = body_owner.get_or_null(p_body);
ERR_FAIL_NULL(body);
GodotSpace3D *space = nullptr;
if (p_space.is_valid()) {
space = space_owner.get_or_null(p_space);
ERR_FAIL_NULL(space);
}
if (body->get_space() == space) {
return;
}
body->clear_constraint_map();
body->set_space(space);
};
RID GodotPhysicsServer3D::body_get_space(RID p_body) const {
GodotBody3D *body = body_owner.get_or_null(p_body);
ERR_FAIL_NULL_V(body, RID());
GodotSpace3D *space = body->get_space();
if (!space) {
return RID();
}
return space->get_self();
};
void GodotPhysicsServer3D::body_set_mode(RID p_body, BodyMode p_mode) {
GodotBody3D *body = body_owner.get_or_null(p_body);
ERR_FAIL_NULL(body);
body->set_mode(p_mode);
};
PhysicsServer3D::BodyMode GodotPhysicsServer3D::body_get_mode(RID p_body) const {
GodotBody3D *body = body_owner.get_or_null(p_body);
ERR_FAIL_NULL_V(body, BODY_MODE_STATIC);
return body->get_mode();
};
void GodotPhysicsServer3D::body_add_shape(RID p_body, RID p_shape, const Transform3D &p_transform, bool p_disabled) { … }
void GodotPhysicsServer3D::body_set_shape(RID p_body, int p_shape_idx, RID p_shape) { … }
void GodotPhysicsServer3D::body_set_shape_transform(RID p_body, int p_shape_idx, const Transform3D &p_transform) { … }
int GodotPhysicsServer3D::body_get_shape_count(RID p_body) const { … }
RID GodotPhysicsServer3D::body_get_shape(RID p_body, int p_shape_idx) const { … }
void GodotPhysicsServer3D::body_set_shape_disabled(RID p_body, int p_shape_idx, bool p_disabled) { … }
Transform3D GodotPhysicsServer3D::body_get_shape_transform(RID p_body, int p_shape_idx) const { … }
void GodotPhysicsServer3D::body_remove_shape(RID p_body, int p_shape_idx) { … }
void GodotPhysicsServer3D::body_clear_shapes(RID p_body) { … }
void GodotPhysicsServer3D::body_set_enable_continuous_collision_detection(RID p_body, bool p_enable) { … }
bool GodotPhysicsServer3D::body_is_continuous_collision_detection_enabled(RID p_body) const { … }
void GodotPhysicsServer3D::body_set_collision_layer(RID p_body, uint32_t p_layer) { … }
uint32_t GodotPhysicsServer3D::body_get_collision_layer(RID p_body) const { … }
void GodotPhysicsServer3D::body_set_collision_mask(RID p_body, uint32_t p_mask) { … }
uint32_t GodotPhysicsServer3D::body_get_collision_mask(RID p_body) const { … }
void GodotPhysicsServer3D::body_set_collision_priority(RID p_body, real_t p_priority) { … }
real_t GodotPhysicsServer3D::body_get_collision_priority(RID p_body) const { … }
void GodotPhysicsServer3D::body_attach_object_instance_id(RID p_body, ObjectID p_id) { … }
ObjectID GodotPhysicsServer3D::body_get_object_instance_id(RID p_body) const { … }
void GodotPhysicsServer3D::body_set_user_flags(RID p_body, uint32_t p_flags) { … }
uint32_t GodotPhysicsServer3D::body_get_user_flags(RID p_body) const { … }
void GodotPhysicsServer3D::body_set_param(RID p_body, BodyParameter p_param, const Variant &p_value) { … }
Variant GodotPhysicsServer3D::body_get_param(RID p_body, BodyParameter p_param) const { … }
void GodotPhysicsServer3D::body_reset_mass_properties(RID p_body) { … }
void GodotPhysicsServer3D::body_set_state(RID p_body, BodyState p_state, const Variant &p_variant) { … }
Variant GodotPhysicsServer3D::body_get_state(RID p_body, BodyState p_state) const { … }
void GodotPhysicsServer3D::body_apply_central_impulse(RID p_body, const Vector3 &p_impulse) { … }
void GodotPhysicsServer3D::body_apply_impulse(RID p_body, const Vector3 &p_impulse, const Vector3 &p_position) { … }
void GodotPhysicsServer3D::body_apply_torque_impulse(RID p_body, const Vector3 &p_impulse) { … }
void GodotPhysicsServer3D::body_apply_central_force(RID p_body, const Vector3 &p_force) { … }
void GodotPhysicsServer3D::body_apply_force(RID p_body, const Vector3 &p_force, const Vector3 &p_position) { … }
void GodotPhysicsServer3D::body_apply_torque(RID p_body, const Vector3 &p_torque) { … }
void GodotPhysicsServer3D::body_add_constant_central_force(RID p_body, const Vector3 &p_force) { … }
void GodotPhysicsServer3D::body_add_constant_force(RID p_body, const Vector3 &p_force, const Vector3 &p_position) { … }
void GodotPhysicsServer3D::body_add_constant_torque(RID p_body, const Vector3 &p_torque) { … }
void GodotPhysicsServer3D::body_set_constant_force(RID p_body, const Vector3 &p_force) { … }
Vector3 GodotPhysicsServer3D::body_get_constant_force(RID p_body) const { … }
void GodotPhysicsServer3D::body_set_constant_torque(RID p_body, const Vector3 &p_torque) { … }
Vector3 GodotPhysicsServer3D::body_get_constant_torque(RID p_body) const { … }
void GodotPhysicsServer3D::body_set_axis_velocity(RID p_body, const Vector3 &p_axis_velocity) { … }
void GodotPhysicsServer3D::body_set_axis_lock(RID p_body, BodyAxis p_axis, bool p_lock) { … }
bool GodotPhysicsServer3D::body_is_axis_locked(RID p_body, BodyAxis p_axis) const { … }
void GodotPhysicsServer3D::body_add_collision_exception(RID p_body, RID p_body_b) {
GodotBody3D *body = body_owner.get_or_null(p_body);
ERR_FAIL_NULL(body);
body->add_exception(p_body_b);
body->wakeup();
};
void GodotPhysicsServer3D::body_remove_collision_exception(RID p_body, RID p_body_b) {
GodotBody3D *body = body_owner.get_or_null(p_body);
ERR_FAIL_NULL(body);
body->remove_exception(p_body_b);
body->wakeup();
};
void GodotPhysicsServer3D::body_get_collision_exceptions(RID p_body, List<RID> *p_exceptions) {
GodotBody3D *body = body_owner.get_or_null(p_body);
ERR_FAIL_NULL(body);
for (int i = 0; i < body->get_exceptions().size(); i++) {
p_exceptions->push_back(body->get_exceptions()[i]);
}
};
void GodotPhysicsServer3D::body_set_contacts_reported_depth_threshold(RID p_body, real_t p_threshold) {
GodotBody3D *body = body_owner.get_or_null(p_body);
ERR_FAIL_NULL(body);
};
real_t GodotPhysicsServer3D::body_get_contacts_reported_depth_threshold(RID p_body) const {
GodotBody3D *body = body_owner.get_or_null(p_body);
ERR_FAIL_NULL_V(body, 0);
return 0;
};
void GodotPhysicsServer3D::body_set_omit_force_integration(RID p_body, bool p_omit) {
GodotBody3D *body = body_owner.get_or_null(p_body);
ERR_FAIL_NULL(body);
body->set_omit_force_integration(p_omit);
};
bool GodotPhysicsServer3D::body_is_omitting_force_integration(RID p_body) const {
GodotBody3D *body = body_owner.get_or_null(p_body);
ERR_FAIL_NULL_V(body, false);
return body->get_omit_force_integration();
};
void GodotPhysicsServer3D::body_set_max_contacts_reported(RID p_body, int p_contacts) { … }
int GodotPhysicsServer3D::body_get_max_contacts_reported(RID p_body) const { … }
void GodotPhysicsServer3D::body_set_state_sync_callback(RID p_body, const Callable &p_callable) { … }
void GodotPhysicsServer3D::body_set_force_integration_callback(RID p_body, const Callable &p_callable, const Variant &p_udata) { … }
void GodotPhysicsServer3D::body_set_ray_pickable(RID p_body, bool p_enable) { … }
bool GodotPhysicsServer3D::body_test_motion(RID p_body, const MotionParameters &p_parameters, MotionResult *r_result) { … }
PhysicsDirectBodyState3D *GodotPhysicsServer3D::body_get_direct_state(RID p_body) { … }
RID GodotPhysicsServer3D::soft_body_create() { … }
void GodotPhysicsServer3D::soft_body_update_rendering_server(RID p_body, PhysicsServer3DRenderingServerHandler *p_rendering_server_handler) { … }
void GodotPhysicsServer3D::soft_body_set_space(RID p_body, RID p_space) { … }
RID GodotPhysicsServer3D::soft_body_get_space(RID p_body) const { … }
void GodotPhysicsServer3D::soft_body_set_collision_layer(RID p_body, uint32_t p_layer) { … }
uint32_t GodotPhysicsServer3D::soft_body_get_collision_layer(RID p_body) const { … }
void GodotPhysicsServer3D::soft_body_set_collision_mask(RID p_body, uint32_t p_mask) { … }
uint32_t GodotPhysicsServer3D::soft_body_get_collision_mask(RID p_body) const { … }
void GodotPhysicsServer3D::soft_body_add_collision_exception(RID p_body, RID p_body_b) { … }
void GodotPhysicsServer3D::soft_body_remove_collision_exception(RID p_body, RID p_body_b) { … }
void GodotPhysicsServer3D::soft_body_get_collision_exceptions(RID p_body, List<RID> *p_exceptions) { … }
void GodotPhysicsServer3D::soft_body_set_state(RID p_body, BodyState p_state, const Variant &p_variant) { … }
Variant GodotPhysicsServer3D::soft_body_get_state(RID p_body, BodyState p_state) const { … }
void GodotPhysicsServer3D::soft_body_set_transform(RID p_body, const Transform3D &p_transform) { … }
void GodotPhysicsServer3D::soft_body_set_ray_pickable(RID p_body, bool p_enable) { … }
void GodotPhysicsServer3D::soft_body_set_simulation_precision(RID p_body, int p_simulation_precision) { … }
int GodotPhysicsServer3D::soft_body_get_simulation_precision(RID p_body) const { … }
void GodotPhysicsServer3D::soft_body_set_total_mass(RID p_body, real_t p_total_mass) { … }
real_t GodotPhysicsServer3D::soft_body_get_total_mass(RID p_body) const { … }
void GodotPhysicsServer3D::soft_body_set_linear_stiffness(RID p_body, real_t p_stiffness) { … }
real_t GodotPhysicsServer3D::soft_body_get_linear_stiffness(RID p_body) const { … }
void GodotPhysicsServer3D::soft_body_set_pressure_coefficient(RID p_body, real_t p_pressure_coefficient) { … }
real_t GodotPhysicsServer3D::soft_body_get_pressure_coefficient(RID p_body) const { … }
void GodotPhysicsServer3D::soft_body_set_damping_coefficient(RID p_body, real_t p_damping_coefficient) { … }
real_t GodotPhysicsServer3D::soft_body_get_damping_coefficient(RID p_body) const { … }
void GodotPhysicsServer3D::soft_body_set_drag_coefficient(RID p_body, real_t p_drag_coefficient) { … }
real_t GodotPhysicsServer3D::soft_body_get_drag_coefficient(RID p_body) const { … }
void GodotPhysicsServer3D::soft_body_set_mesh(RID p_body, RID p_mesh) { … }
AABB GodotPhysicsServer3D::soft_body_get_bounds(RID p_body) const { … }
void GodotPhysicsServer3D::soft_body_move_point(RID p_body, int p_point_index, const Vector3 &p_global_position) { … }
Vector3 GodotPhysicsServer3D::soft_body_get_point_global_position(RID p_body, int p_point_index) const { … }
void GodotPhysicsServer3D::soft_body_remove_all_pinned_points(RID p_body) { … }
void GodotPhysicsServer3D::soft_body_pin_point(RID p_body, int p_point_index, bool p_pin) { … }
bool GodotPhysicsServer3D::soft_body_is_point_pinned(RID p_body, int p_point_index) const { … }
RID GodotPhysicsServer3D::joint_create() { … }
void GodotPhysicsServer3D::joint_clear(RID p_joint) { … }
void GodotPhysicsServer3D::joint_make_pin(RID p_joint, RID p_body_A, const Vector3 &p_local_A, RID p_body_B, const Vector3 &p_local_B) { … }
void GodotPhysicsServer3D::pin_joint_set_param(RID p_joint, PinJointParam p_param, real_t p_value) { … }
real_t GodotPhysicsServer3D::pin_joint_get_param(RID p_joint, PinJointParam p_param) const { … }
void GodotPhysicsServer3D::pin_joint_set_local_a(RID p_joint, const Vector3 &p_A) { … }
Vector3 GodotPhysicsServer3D::pin_joint_get_local_a(RID p_joint) const { … }
void GodotPhysicsServer3D::pin_joint_set_local_b(RID p_joint, const Vector3 &p_B) { … }
Vector3 GodotPhysicsServer3D::pin_joint_get_local_b(RID p_joint) const { … }
void GodotPhysicsServer3D::joint_make_hinge(RID p_joint, RID p_body_A, const Transform3D &p_frame_A, RID p_body_B, const Transform3D &p_frame_B) { … }
void GodotPhysicsServer3D::joint_make_hinge_simple(RID p_joint, RID p_body_A, const Vector3 &p_pivot_A, const Vector3 &p_axis_A, RID p_body_B, const Vector3 &p_pivot_B, const Vector3 &p_axis_B) { … }
void GodotPhysicsServer3D::hinge_joint_set_param(RID p_joint, HingeJointParam p_param, real_t p_value) { … }
real_t GodotPhysicsServer3D::hinge_joint_get_param(RID p_joint, HingeJointParam p_param) const { … }
void GodotPhysicsServer3D::hinge_joint_set_flag(RID p_joint, HingeJointFlag p_flag, bool p_enabled) { … }
bool GodotPhysicsServer3D::hinge_joint_get_flag(RID p_joint, HingeJointFlag p_flag) const { … }
void GodotPhysicsServer3D::joint_set_solver_priority(RID p_joint, int p_priority) { … }
int GodotPhysicsServer3D::joint_get_solver_priority(RID p_joint) const { … }
void GodotPhysicsServer3D::joint_disable_collisions_between_bodies(RID p_joint, bool p_disable) { … }
bool GodotPhysicsServer3D::joint_is_disabled_collisions_between_bodies(RID p_joint) const { … }
GodotPhysicsServer3D::JointType GodotPhysicsServer3D::joint_get_type(RID p_joint) const { … }
void GodotPhysicsServer3D::joint_make_slider(RID p_joint, RID p_body_A, const Transform3D &p_local_frame_A, RID p_body_B, const Transform3D &p_local_frame_B) { … }
void GodotPhysicsServer3D::slider_joint_set_param(RID p_joint, SliderJointParam p_param, real_t p_value) { … }
real_t GodotPhysicsServer3D::slider_joint_get_param(RID p_joint, SliderJointParam p_param) const { … }
void GodotPhysicsServer3D::joint_make_cone_twist(RID p_joint, RID p_body_A, const Transform3D &p_local_frame_A, RID p_body_B, const Transform3D &p_local_frame_B) { … }
void GodotPhysicsServer3D::cone_twist_joint_set_param(RID p_joint, ConeTwistJointParam p_param, real_t p_value) { … }
real_t GodotPhysicsServer3D::cone_twist_joint_get_param(RID p_joint, ConeTwistJointParam p_param) const { … }
void GodotPhysicsServer3D::joint_make_generic_6dof(RID p_joint, RID p_body_A, const Transform3D &p_local_frame_A, RID p_body_B, const Transform3D &p_local_frame_B) { … }
void GodotPhysicsServer3D::generic_6dof_joint_set_param(RID p_joint, Vector3::Axis p_axis, G6DOFJointAxisParam p_param, real_t p_value) { … }
real_t GodotPhysicsServer3D::generic_6dof_joint_get_param(RID p_joint, Vector3::Axis p_axis, G6DOFJointAxisParam p_param) const { … }
void GodotPhysicsServer3D::generic_6dof_joint_set_flag(RID p_joint, Vector3::Axis p_axis, G6DOFJointAxisFlag p_flag, bool p_enable) { … }
bool GodotPhysicsServer3D::generic_6dof_joint_get_flag(RID p_joint, Vector3::Axis p_axis, G6DOFJointAxisFlag p_flag) const { … }
void GodotPhysicsServer3D::free(RID p_rid) { … }
void GodotPhysicsServer3D::set_active(bool p_active) { … }
void GodotPhysicsServer3D::init() { … }
void GodotPhysicsServer3D::step(real_t p_step) { … }
void GodotPhysicsServer3D::sync() { … }
void GodotPhysicsServer3D::flush_queries() { … }
void GodotPhysicsServer3D::end_sync() { … }
void GodotPhysicsServer3D::finish() { … }
int GodotPhysicsServer3D::get_process_info(ProcessInfo p_info) { … }
void GodotPhysicsServer3D::_update_shapes() { … }
void GodotPhysicsServer3D::_shape_col_cbk(const Vector3 &p_point_A, int p_index_A, const Vector3 &p_point_B, int p_index_B, const Vector3 &normal, void *p_userdata) { … }
GodotPhysicsServer3D *GodotPhysicsServer3D::godot_singleton = …;
GodotPhysicsServer3D::GodotPhysicsServer3D(bool p_using_threads) {
godot_singleton = this;
GodotBroadPhase3D::create_func = GodotBroadPhase3DBVH::_create;
using_threads = p_using_threads;
};