Merge pull request #70707 from mihe/bind-physics-exclude

Bind methods related to physics query exclusions
This commit is contained in:
Rémi Verschelde 2023-01-11 10:36:53 +01:00 committed by GitHub
commit 9c02bf1b11
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 46 additions and 0 deletions

View file

@ -87,5 +87,11 @@
<description>
</description>
</method>
<method name="is_body_excluded_from_query" qualifiers="const">
<return type="bool" />
<param index="0" name="body" type="RID" />
<description>
</description>
</method>
</methods>
</class>

View file

@ -95,5 +95,11 @@
<description>
</description>
</method>
<method name="is_body_excluded_from_query" qualifiers="const">
<return type="bool" />
<param index="0" name="body" type="RID" />
<description>
</description>
</method>
</methods>
</class>

View file

@ -933,5 +933,17 @@
<description>
</description>
</method>
<method name="body_test_motion_is_excluding_body" qualifiers="const">
<return type="bool" />
<param index="0" name="body" type="RID" />
<description>
</description>
</method>
<method name="body_test_motion_is_excluding_object" qualifiers="const">
<return type="bool" />
<param index="0" name="object" type="int" />
<description>
</description>
</method>
</methods>
</class>

View file

@ -1284,5 +1284,17 @@
<description>
</description>
</method>
<method name="body_test_motion_is_excluding_body" qualifiers="const">
<return type="bool" />
<param index="0" name="body" type="RID" />
<description>
</description>
</method>
<method name="body_test_motion_is_excluding_object" qualifiers="const">
<return type="bool" />
<param index="0" name="object" type="int" />
<description>
</description>
</method>
</methods>
</class>

View file

@ -37,6 +37,8 @@ bool PhysicsDirectSpaceState2DExtension::is_body_excluded_from_query(const RID &
thread_local const HashSet<RID> *PhysicsDirectSpaceState2DExtension::exclude = nullptr;
void PhysicsDirectSpaceState2DExtension::_bind_methods() {
ClassDB::bind_method(D_METHOD("is_body_excluded_from_query", "body"), &PhysicsDirectSpaceState2DExtension::is_body_excluded_from_query);
GDVIRTUAL_BIND(_intersect_ray, "from", "to", "collision_mask", "collide_with_bodies", "collide_with_areas", "hit_from_inside", "result");
GDVIRTUAL_BIND(_intersect_point, "position", "canvas_instance_id", "collision_mask", "collide_with_bodies", "collide_with_areas", "results", "max_results");
GDVIRTUAL_BIND(_intersect_shape, "shape_rid", "transform", "motion", "margin", "collision_mask", "collide_with_bodies", "collide_with_areas", "result", "max_results");
@ -203,6 +205,9 @@ void PhysicsServer2DExtension::_bind_methods() {
/* BODY API */
ClassDB::bind_method(D_METHOD("body_test_motion_is_excluding_body", "body"), &PhysicsServer2DExtension::body_test_motion_is_excluding_body);
ClassDB::bind_method(D_METHOD("body_test_motion_is_excluding_object", "object"), &PhysicsServer2DExtension::body_test_motion_is_excluding_object);
GDVIRTUAL_BIND(_body_create);
GDVIRTUAL_BIND(_body_set_space, "body", "space");

View file

@ -37,6 +37,8 @@ bool PhysicsDirectSpaceState3DExtension::is_body_excluded_from_query(const RID &
thread_local const HashSet<RID> *PhysicsDirectSpaceState3DExtension::exclude = nullptr;
void PhysicsDirectSpaceState3DExtension::_bind_methods() {
ClassDB::bind_method(D_METHOD("is_body_excluded_from_query", "body"), &PhysicsDirectSpaceState3DExtension::is_body_excluded_from_query);
GDVIRTUAL_BIND(_intersect_ray, "from", "to", "collision_mask", "collide_with_bodies", "collide_with_areas", "hit_from_inside", "hit_back_faces", "result");
GDVIRTUAL_BIND(_intersect_point, "position", "collision_mask", "collide_with_bodies", "collide_with_areas", "results", "max_results");
GDVIRTUAL_BIND(_intersect_shape, "shape_rid", "transform", "motion", "margin", "collision_mask", "collide_with_bodies", "collide_with_areas", "result_count", "max_results");
@ -206,6 +208,9 @@ void PhysicsServer3DExtension::_bind_methods() {
/* BODY API */
ClassDB::bind_method(D_METHOD("body_test_motion_is_excluding_body", "body"), &PhysicsServer3DExtension::body_test_motion_is_excluding_body);
ClassDB::bind_method(D_METHOD("body_test_motion_is_excluding_object", "object"), &PhysicsServer3DExtension::body_test_motion_is_excluding_object);
GDVIRTUAL_BIND(_body_create);
GDVIRTUAL_BIND(_body_set_space, "body", "space");