-
-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #65321 from rburing/physics_server_2d_extension
Create GDExtension classes for PhysicsServer2D
- Loading branch information
Showing
10 changed files
with
1,890 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,249 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<class name="PhysicsDirectBodyState2DExtension" inherits="PhysicsDirectBodyState2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> | ||
<brief_description> | ||
</brief_description> | ||
<description> | ||
</description> | ||
<tutorials> | ||
</tutorials> | ||
<methods> | ||
<method name="_add_constant_central_force" qualifiers="virtual"> | ||
<return type="void" /> | ||
<param index="0" name="force" type="Vector2" /> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="_add_constant_force" qualifiers="virtual"> | ||
<return type="void" /> | ||
<param index="0" name="force" type="Vector2" /> | ||
<param index="1" name="position" type="Vector2" /> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="_add_constant_torque" qualifiers="virtual"> | ||
<return type="void" /> | ||
<param index="0" name="torque" type="float" /> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="_apply_central_force" qualifiers="virtual"> | ||
<return type="void" /> | ||
<param index="0" name="force" type="Vector2" /> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="_apply_central_impulse" qualifiers="virtual"> | ||
<return type="void" /> | ||
<param index="0" name="impulse" type="Vector2" /> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="_apply_force" qualifiers="virtual"> | ||
<return type="void" /> | ||
<param index="0" name="force" type="Vector2" /> | ||
<param index="1" name="position" type="Vector2" /> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="_apply_impulse" qualifiers="virtual"> | ||
<return type="void" /> | ||
<param index="0" name="impulse" type="Vector2" /> | ||
<param index="1" name="position" type="Vector2" /> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="_apply_torque" qualifiers="virtual"> | ||
<return type="void" /> | ||
<param index="0" name="torque" type="float" /> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="_apply_torque_impulse" qualifiers="virtual"> | ||
<return type="void" /> | ||
<param index="0" name="impulse" type="float" /> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="_get_angular_velocity" qualifiers="virtual const"> | ||
<return type="float" /> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="_get_center_of_mass" qualifiers="virtual const"> | ||
<return type="Vector2" /> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="_get_center_of_mass_local" qualifiers="virtual const"> | ||
<return type="Vector2" /> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="_get_constant_force" qualifiers="virtual const"> | ||
<return type="Vector2" /> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="_get_constant_torque" qualifiers="virtual const"> | ||
<return type="float" /> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="_get_contact_collider" qualifiers="virtual const"> | ||
<return type="RID" /> | ||
<param index="0" name="contact_idx" type="int" /> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="_get_contact_collider_id" qualifiers="virtual const"> | ||
<return type="int" /> | ||
<param index="0" name="contact_idx" type="int" /> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="_get_contact_collider_object" qualifiers="virtual const"> | ||
<return type="Object" /> | ||
<param index="0" name="contact_idx" type="int" /> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="_get_contact_collider_position" qualifiers="virtual const"> | ||
<return type="Vector2" /> | ||
<param index="0" name="contact_idx" type="int" /> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="_get_contact_collider_shape" qualifiers="virtual const"> | ||
<return type="int" /> | ||
<param index="0" name="contact_idx" type="int" /> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="_get_contact_collider_velocity_at_position" qualifiers="virtual const"> | ||
<return type="Vector2" /> | ||
<param index="0" name="contact_idx" type="int" /> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="_get_contact_count" qualifiers="virtual const"> | ||
<return type="int" /> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="_get_contact_local_normal" qualifiers="virtual const"> | ||
<return type="Vector2" /> | ||
<param index="0" name="contact_idx" type="int" /> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="_get_contact_local_position" qualifiers="virtual const"> | ||
<return type="Vector2" /> | ||
<param index="0" name="contact_idx" type="int" /> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="_get_contact_local_shape" qualifiers="virtual const"> | ||
<return type="int" /> | ||
<param index="0" name="contact_idx" type="int" /> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="_get_inverse_inertia" qualifiers="virtual const"> | ||
<return type="float" /> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="_get_inverse_mass" qualifiers="virtual const"> | ||
<return type="float" /> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="_get_linear_velocity" qualifiers="virtual const"> | ||
<return type="Vector2" /> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="_get_space_state" qualifiers="virtual"> | ||
<return type="PhysicsDirectSpaceState2D" /> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="_get_step" qualifiers="virtual const"> | ||
<return type="float" /> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="_get_total_angular_damp" qualifiers="virtual const"> | ||
<return type="float" /> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="_get_total_gravity" qualifiers="virtual const"> | ||
<return type="Vector2" /> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="_get_total_linear_damp" qualifiers="virtual const"> | ||
<return type="float" /> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="_get_transform" qualifiers="virtual const"> | ||
<return type="Transform2D" /> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="_get_velocity_at_local_position" qualifiers="virtual const"> | ||
<return type="Vector2" /> | ||
<param index="0" name="local_position" type="Vector2" /> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="_integrate_forces" qualifiers="virtual"> | ||
<return type="void" /> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="_is_sleeping" qualifiers="virtual const"> | ||
<return type="bool" /> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="_set_angular_velocity" qualifiers="virtual"> | ||
<return type="void" /> | ||
<param index="0" name="velocity" type="float" /> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="_set_constant_force" qualifiers="virtual"> | ||
<return type="void" /> | ||
<param index="0" name="force" type="Vector2" /> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="_set_constant_torque" qualifiers="virtual"> | ||
<return type="void" /> | ||
<param index="0" name="torque" type="float" /> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="_set_linear_velocity" qualifiers="virtual"> | ||
<return type="void" /> | ||
<param index="0" name="velocity" type="Vector2" /> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="_set_sleep_state" qualifiers="virtual"> | ||
<return type="void" /> | ||
<param index="0" name="enabled" type="bool" /> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="_set_transform" qualifiers="virtual"> | ||
<return type="void" /> | ||
<param index="0" name="transform" type="Transform2D" /> | ||
<description> | ||
</description> | ||
</method> | ||
</methods> | ||
</class> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<class name="PhysicsDirectSpaceState2DExtension" inherits="PhysicsDirectSpaceState2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> | ||
<brief_description> | ||
</brief_description> | ||
<description> | ||
</description> | ||
<tutorials> | ||
</tutorials> | ||
<methods> | ||
<method name="_cast_motion" qualifiers="virtual"> | ||
<return type="bool" /> | ||
<param index="0" name="shape_rid" type="RID" /> | ||
<param index="1" name="transform" type="Transform2D" /> | ||
<param index="2" name="motion" type="Vector2" /> | ||
<param index="3" name="margin" type="float" /> | ||
<param index="4" name="collision_mask" type="int" /> | ||
<param index="5" name="collide_with_bodies" type="bool" /> | ||
<param index="6" name="collide_with_areas" type="bool" /> | ||
<param index="7" name="closest_safe" type="float*" /> | ||
<param index="8" name="closest_unsafe" type="float*" /> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="_collide_shape" qualifiers="virtual"> | ||
<return type="bool" /> | ||
<param index="0" name="shape_rid" type="RID" /> | ||
<param index="1" name="transform" type="Transform2D" /> | ||
<param index="2" name="motion" type="Vector2" /> | ||
<param index="3" name="margin" type="float" /> | ||
<param index="4" name="collision_mask" type="int" /> | ||
<param index="5" name="collide_with_bodies" type="bool" /> | ||
<param index="6" name="collide_with_areas" type="bool" /> | ||
<param index="7" name="results" type="void*" /> | ||
<param index="8" name="max_results" type="int" /> | ||
<param index="9" name="result_count" type="int32_t*" /> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="_intersect_point" qualifiers="virtual"> | ||
<return type="int" /> | ||
<param index="0" name="position" type="Vector2" /> | ||
<param index="1" name="canvas_instance_id" type="int" /> | ||
<param index="2" name="collision_mask" type="int" /> | ||
<param index="3" name="collide_with_bodies" type="bool" /> | ||
<param index="4" name="collide_with_areas" type="bool" /> | ||
<param index="5" name="results" type="PhysicsServer2DExtensionShapeResult*" /> | ||
<param index="6" name="max_results" type="int" /> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="_intersect_ray" qualifiers="virtual"> | ||
<return type="bool" /> | ||
<param index="0" name="from" type="Vector2" /> | ||
<param index="1" name="to" type="Vector2" /> | ||
<param index="2" name="collision_mask" type="int" /> | ||
<param index="3" name="collide_with_bodies" type="bool" /> | ||
<param index="4" name="collide_with_areas" type="bool" /> | ||
<param index="5" name="hit_from_inside" type="bool" /> | ||
<param index="6" name="result" type="PhysicsServer2DExtensionRayResult*" /> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="_intersect_shape" qualifiers="virtual"> | ||
<return type="int" /> | ||
<param index="0" name="shape_rid" type="RID" /> | ||
<param index="1" name="transform" type="Transform2D" /> | ||
<param index="2" name="motion" type="Vector2" /> | ||
<param index="3" name="margin" type="float" /> | ||
<param index="4" name="collision_mask" type="int" /> | ||
<param index="5" name="collide_with_bodies" type="bool" /> | ||
<param index="6" name="collide_with_areas" type="bool" /> | ||
<param index="7" name="result" type="PhysicsServer2DExtensionShapeResult*" /> | ||
<param index="8" name="max_results" type="int" /> | ||
<description> | ||
</description> | ||
</method> | ||
<method name="_rest_info" qualifiers="virtual"> | ||
<return type="bool" /> | ||
<param index="0" name="shape_rid" type="RID" /> | ||
<param index="1" name="transform" type="Transform2D" /> | ||
<param index="2" name="motion" type="Vector2" /> | ||
<param index="3" name="margin" type="float" /> | ||
<param index="4" name="collision_mask" type="int" /> | ||
<param index="5" name="collide_with_bodies" type="bool" /> | ||
<param index="6" name="collide_with_areas" type="bool" /> | ||
<param index="7" name="rest_info" type="PhysicsServer2DExtensionShapeRestInfo*" /> | ||
<description> | ||
</description> | ||
</method> | ||
</methods> | ||
</class> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.