Skip to content

Latest commit

 

History

History
159 lines (94 loc) · 14 KB

class_physicsdirectspacestate2dextension.rst

File metadata and controls

159 lines (94 loc) · 14 KB
github_url:hide

PhysicsDirectSpaceState2DExtension

Inherits: :ref:`PhysicsDirectSpaceState2D<class_PhysicsDirectSpaceState2D>` < :ref:`Object<class_Object>`

Provides virtual methods that can be overridden to create custom :ref:`PhysicsDirectSpaceState2D<class_PhysicsDirectSpaceState2D>` implementations.

.. rst-class:: classref-introduction-group

Description

This class extends :ref:`PhysicsDirectSpaceState2D<class_PhysicsDirectSpaceState2D>` by providing additional virtual methods that can be overridden. When these methods are overridden, they will be called instead of the internal methods of the physics server.

Intended for use with GDExtension to create custom implementations of :ref:`PhysicsDirectSpaceState2D<class_PhysicsDirectSpaceState2D>`.

.. rst-class:: classref-reftable-group

Methods

:ref:`bool<class_bool>` :ref:`_cast_motion<class_PhysicsDirectSpaceState2DExtension_method__cast_motion>` ( :ref:`RID<class_RID>` shape_rid, :ref:`Transform2D<class_Transform2D>` transform, :ref:`Vector2<class_Vector2>` motion, :ref:`float<class_float>` margin, :ref:`int<class_int>` collision_mask, :ref:`bool<class_bool>` collide_with_bodies, :ref:`bool<class_bool>` collide_with_areas, float* closest_safe, float* closest_unsafe ) |virtual|
:ref:`bool<class_bool>` :ref:`_collide_shape<class_PhysicsDirectSpaceState2DExtension_method__collide_shape>` ( :ref:`RID<class_RID>` shape_rid, :ref:`Transform2D<class_Transform2D>` transform, :ref:`Vector2<class_Vector2>` motion, :ref:`float<class_float>` margin, :ref:`int<class_int>` collision_mask, :ref:`bool<class_bool>` collide_with_bodies, :ref:`bool<class_bool>` collide_with_areas, void* results, :ref:`int<class_int>` max_results, int32_t* result_count ) |virtual|
:ref:`int<class_int>` :ref:`_intersect_point<class_PhysicsDirectSpaceState2DExtension_method__intersect_point>` ( :ref:`Vector2<class_Vector2>` position, :ref:`int<class_int>` canvas_instance_id, :ref:`int<class_int>` collision_mask, :ref:`bool<class_bool>` collide_with_bodies, :ref:`bool<class_bool>` collide_with_areas, PhysicsServer2DExtensionShapeResult* results, :ref:`int<class_int>` max_results ) |virtual|
:ref:`bool<class_bool>` :ref:`_intersect_ray<class_PhysicsDirectSpaceState2DExtension_method__intersect_ray>` ( :ref:`Vector2<class_Vector2>` from, :ref:`Vector2<class_Vector2>` to, :ref:`int<class_int>` collision_mask, :ref:`bool<class_bool>` collide_with_bodies, :ref:`bool<class_bool>` collide_with_areas, :ref:`bool<class_bool>` hit_from_inside, PhysicsServer2DExtensionRayResult* result ) |virtual|
:ref:`int<class_int>` :ref:`_intersect_shape<class_PhysicsDirectSpaceState2DExtension_method__intersect_shape>` ( :ref:`RID<class_RID>` shape_rid, :ref:`Transform2D<class_Transform2D>` transform, :ref:`Vector2<class_Vector2>` motion, :ref:`float<class_float>` margin, :ref:`int<class_int>` collision_mask, :ref:`bool<class_bool>` collide_with_bodies, :ref:`bool<class_bool>` collide_with_areas, PhysicsServer2DExtensionShapeResult* result, :ref:`int<class_int>` max_results ) |virtual|
:ref:`bool<class_bool>` :ref:`_rest_info<class_PhysicsDirectSpaceState2DExtension_method__rest_info>` ( :ref:`RID<class_RID>` shape_rid, :ref:`Transform2D<class_Transform2D>` transform, :ref:`Vector2<class_Vector2>` motion, :ref:`float<class_float>` margin, :ref:`int<class_int>` collision_mask, :ref:`bool<class_bool>` collide_with_bodies, :ref:`bool<class_bool>` collide_with_areas, PhysicsServer2DExtensionShapeRestInfo* rest_info ) |virtual|
:ref:`bool<class_bool>` :ref:`is_body_excluded_from_query<class_PhysicsDirectSpaceState2DExtension_method_is_body_excluded_from_query>` ( :ref:`RID<class_RID>` body ) |const|
.. rst-class:: classref-section-separator


.. rst-class:: classref-descriptions-group

Method Descriptions

.. rst-class:: classref-method

:ref:`bool<class_bool>` _cast_motion ( :ref:`RID<class_RID>` shape_rid, :ref:`Transform2D<class_Transform2D>` transform, :ref:`Vector2<class_Vector2>` motion, :ref:`float<class_float>` margin, :ref:`int<class_int>` collision_mask, :ref:`bool<class_bool>` collide_with_bodies, :ref:`bool<class_bool>` collide_with_areas, float* closest_safe, float* closest_unsafe ) |virtual|

There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
.. rst-class:: classref-item-separator


.. rst-class:: classref-method

:ref:`bool<class_bool>` _collide_shape ( :ref:`RID<class_RID>` shape_rid, :ref:`Transform2D<class_Transform2D>` transform, :ref:`Vector2<class_Vector2>` motion, :ref:`float<class_float>` margin, :ref:`int<class_int>` collision_mask, :ref:`bool<class_bool>` collide_with_bodies, :ref:`bool<class_bool>` collide_with_areas, void* results, :ref:`int<class_int>` max_results, int32_t* result_count ) |virtual|

There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
.. rst-class:: classref-item-separator


.. rst-class:: classref-method

:ref:`int<class_int>` _intersect_point ( :ref:`Vector2<class_Vector2>` position, :ref:`int<class_int>` canvas_instance_id, :ref:`int<class_int>` collision_mask, :ref:`bool<class_bool>` collide_with_bodies, :ref:`bool<class_bool>` collide_with_areas, PhysicsServer2DExtensionShapeResult* results, :ref:`int<class_int>` max_results ) |virtual|

There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
.. rst-class:: classref-item-separator


.. rst-class:: classref-method

:ref:`bool<class_bool>` _intersect_ray ( :ref:`Vector2<class_Vector2>` from, :ref:`Vector2<class_Vector2>` to, :ref:`int<class_int>` collision_mask, :ref:`bool<class_bool>` collide_with_bodies, :ref:`bool<class_bool>` collide_with_areas, :ref:`bool<class_bool>` hit_from_inside, PhysicsServer2DExtensionRayResult* result ) |virtual|

There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
.. rst-class:: classref-item-separator


.. rst-class:: classref-method

:ref:`int<class_int>` _intersect_shape ( :ref:`RID<class_RID>` shape_rid, :ref:`Transform2D<class_Transform2D>` transform, :ref:`Vector2<class_Vector2>` motion, :ref:`float<class_float>` margin, :ref:`int<class_int>` collision_mask, :ref:`bool<class_bool>` collide_with_bodies, :ref:`bool<class_bool>` collide_with_areas, PhysicsServer2DExtensionShapeResult* result, :ref:`int<class_int>` max_results ) |virtual|

There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
.. rst-class:: classref-item-separator


.. rst-class:: classref-method

:ref:`bool<class_bool>` _rest_info ( :ref:`RID<class_RID>` shape_rid, :ref:`Transform2D<class_Transform2D>` transform, :ref:`Vector2<class_Vector2>` motion, :ref:`float<class_float>` margin, :ref:`int<class_int>` collision_mask, :ref:`bool<class_bool>` collide_with_bodies, :ref:`bool<class_bool>` collide_with_areas, PhysicsServer2DExtensionShapeRestInfo* rest_info ) |virtual|

There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
.. rst-class:: classref-item-separator


.. rst-class:: classref-method

:ref:`bool<class_bool>` is_body_excluded_from_query ( :ref:`RID<class_RID>` body ) |const|

There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!