class_collisionobject.rst 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. .. _class_CollisionObject:
  2. CollisionObject
  3. ===============
  4. **Inherits:** :ref:`Spatial<class_spatial>`
  5. **Category:** Core
  6. Member Functions
  7. ----------------
  8. +------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  9. | void | :ref:`_input_event<class_CollisionObject__input_event>` **(** :ref:`Object<class_object>` camera, :ref:`InputEvent<class_inputevent>` event, :ref:`Vector3<class_vector3>` click_pos, :ref:`Vector3<class_vector3>` click_normal, :ref:`int<class_int>` shape_idx **)** virtual |
  10. +------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  11. | void | :ref:`add_shape<class_CollisionObject_add_shape>` **(** :ref:`Shape<class_shape>` shape, :ref:`Transform<class_transform>` transform=Transform() **)** |
  12. +------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  13. | :ref:`int<class_int>` | :ref:`get_shape_count<class_CollisionObject_get_shape_count>` **(** **)** const |
  14. +------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  15. | void | :ref:`set_shape<class_CollisionObject_set_shape>` **(** :ref:`int<class_int>` shape_idx, :ref:`Shape<class_shape>` shape **)** |
  16. +------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  17. | void | :ref:`set_shape_transform<class_CollisionObject_set_shape_transform>` **(** :ref:`int<class_int>` shape_idx, :ref:`Transform<class_transform>` transform **)** |
  18. +------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  19. | void | :ref:`set_shape_as_trigger<class_CollisionObject_set_shape_as_trigger>` **(** :ref:`int<class_int>` shape_idx, :ref:`bool<class_bool>` enable **)** |
  20. +------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  21. | :ref:`bool<class_bool>` | :ref:`is_shape_set_as_trigger<class_CollisionObject_is_shape_set_as_trigger>` **(** :ref:`int<class_int>` shape_idx **)** const |
  22. +------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  23. | :ref:`Shape<class_shape>` | :ref:`get_shape<class_CollisionObject_get_shape>` **(** :ref:`int<class_int>` shape_idx **)** const |
  24. +------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  25. | :ref:`Transform<class_transform>` | :ref:`get_shape_transform<class_CollisionObject_get_shape_transform>` **(** :ref:`int<class_int>` shape_idx **)** const |
  26. +------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  27. | void | :ref:`remove_shape<class_CollisionObject_remove_shape>` **(** :ref:`int<class_int>` shape_idx **)** |
  28. +------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  29. | void | :ref:`clear_shapes<class_CollisionObject_clear_shapes>` **(** **)** |
  30. +------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  31. | void | :ref:`set_ray_pickable<class_CollisionObject_set_ray_pickable>` **(** :ref:`bool<class_bool>` ray_pickable **)** |
  32. +------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  33. | :ref:`bool<class_bool>` | :ref:`is_ray_pickable<class_CollisionObject_is_ray_pickable>` **(** **)** const |
  34. +------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  35. | void | :ref:`set_capture_input_on_drag<class_CollisionObject_set_capture_input_on_drag>` **(** :ref:`bool<class_bool>` enable **)** |
  36. +------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  37. | :ref:`bool<class_bool>` | :ref:`get_capture_input_on_drag<class_CollisionObject_get_capture_input_on_drag>` **(** **)** const |
  38. +------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  39. | :ref:`RID<class_rid>` | :ref:`get_rid<class_CollisionObject_get_rid>` **(** **)** const |
  40. +------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  41. Signals
  42. -------
  43. - **mouse_enter** **(** **)**
  44. - **input_event** **(** :ref:`Object<class_object>` camera, :ref:`InputEvent<class_inputevent>` event, :ref:`Vector3<class_vector3>` click_pos, :ref:`Vector3<class_vector3>` click_normal, :ref:`int<class_int>` shape_idx **)**
  45. - **mouse_exit** **(** **)**
  46. Member Function Description
  47. ---------------------------
  48. .. _class_CollisionObject__input_event:
  49. - void **_input_event** **(** :ref:`Object<class_object>` camera, :ref:`InputEvent<class_inputevent>` event, :ref:`Vector3<class_vector3>` click_pos, :ref:`Vector3<class_vector3>` click_normal, :ref:`int<class_int>` shape_idx **)** virtual
  50. .. _class_CollisionObject_add_shape:
  51. - void **add_shape** **(** :ref:`Shape<class_shape>` shape, :ref:`Transform<class_transform>` transform=Transform() **)**
  52. .. _class_CollisionObject_get_shape_count:
  53. - :ref:`int<class_int>` **get_shape_count** **(** **)** const
  54. .. _class_CollisionObject_set_shape:
  55. - void **set_shape** **(** :ref:`int<class_int>` shape_idx, :ref:`Shape<class_shape>` shape **)**
  56. .. _class_CollisionObject_set_shape_transform:
  57. - void **set_shape_transform** **(** :ref:`int<class_int>` shape_idx, :ref:`Transform<class_transform>` transform **)**
  58. .. _class_CollisionObject_set_shape_as_trigger:
  59. - void **set_shape_as_trigger** **(** :ref:`int<class_int>` shape_idx, :ref:`bool<class_bool>` enable **)**
  60. .. _class_CollisionObject_is_shape_set_as_trigger:
  61. - :ref:`bool<class_bool>` **is_shape_set_as_trigger** **(** :ref:`int<class_int>` shape_idx **)** const
  62. .. _class_CollisionObject_get_shape:
  63. - :ref:`Shape<class_shape>` **get_shape** **(** :ref:`int<class_int>` shape_idx **)** const
  64. .. _class_CollisionObject_get_shape_transform:
  65. - :ref:`Transform<class_transform>` **get_shape_transform** **(** :ref:`int<class_int>` shape_idx **)** const
  66. .. _class_CollisionObject_remove_shape:
  67. - void **remove_shape** **(** :ref:`int<class_int>` shape_idx **)**
  68. .. _class_CollisionObject_clear_shapes:
  69. - void **clear_shapes** **(** **)**
  70. .. _class_CollisionObject_set_ray_pickable:
  71. - void **set_ray_pickable** **(** :ref:`bool<class_bool>` ray_pickable **)**
  72. .. _class_CollisionObject_is_ray_pickable:
  73. - :ref:`bool<class_bool>` **is_ray_pickable** **(** **)** const
  74. .. _class_CollisionObject_set_capture_input_on_drag:
  75. - void **set_capture_input_on_drag** **(** :ref:`bool<class_bool>` enable **)**
  76. .. _class_CollisionObject_get_capture_input_on_drag:
  77. - :ref:`bool<class_bool>` **get_capture_input_on_drag** **(** **)** const
  78. .. _class_CollisionObject_get_rid:
  79. - :ref:`RID<class_rid>` **get_rid** **(** **)** const