class_spritebase3d.rst 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the SpriteBase3D.xml source instead.
  3. .. The source is found in doc/classes or modules/<name>/doc_classes.
  4. .. _class_SpriteBase3D:
  5. SpriteBase3D
  6. ============
  7. **Inherits:** :ref:`GeometryInstance<class_geometryinstance>` **<** :ref:`VisualInstance<class_visualinstance>` **<** :ref:`Spatial<class_spatial>` **<** :ref:`Node<class_node>` **<** :ref:`Object<class_object>`
  8. **Inherited By:** :ref:`AnimatedSprite3D<class_animatedsprite3d>`, :ref:`Sprite3D<class_sprite3d>`
  9. **Category:** Core
  10. Brief Description
  11. -----------------
  12. 2D Sprite node in 3D environment.
  13. Member Functions
  14. ----------------
  15. +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+
  16. | :ref:`int<class_int>` | :ref:`get_alpha_cut_mode<class_SpriteBase3D_get_alpha_cut_mode>` **(** **)** const |
  17. +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+
  18. | :ref:`int<class_int>` | :ref:`get_axis<class_SpriteBase3D_get_axis>` **(** **)** const |
  19. +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+
  20. | :ref:`bool<class_bool>` | :ref:`get_draw_flag<class_SpriteBase3D_get_draw_flag>` **(** :ref:`int<class_int>` flag **)** const |
  21. +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+
  22. | :ref:`Rect2<class_rect2>` | :ref:`get_item_rect<class_SpriteBase3D_get_item_rect>` **(** **)** const |
  23. +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+
  24. | :ref:`Color<class_color>` | :ref:`get_modulate<class_SpriteBase3D_get_modulate>` **(** **)** const |
  25. +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+
  26. | :ref:`Vector2<class_vector2>` | :ref:`get_offset<class_SpriteBase3D_get_offset>` **(** **)** const |
  27. +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+
  28. | :ref:`float<class_float>` | :ref:`get_opacity<class_SpriteBase3D_get_opacity>` **(** **)** const |
  29. +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+
  30. | :ref:`float<class_float>` | :ref:`get_pixel_size<class_SpriteBase3D_get_pixel_size>` **(** **)** const |
  31. +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+
  32. | :ref:`bool<class_bool>` | :ref:`is_centered<class_SpriteBase3D_is_centered>` **(** **)** const |
  33. +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+
  34. | :ref:`bool<class_bool>` | :ref:`is_flipped_h<class_SpriteBase3D_is_flipped_h>` **(** **)** const |
  35. +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+
  36. | :ref:`bool<class_bool>` | :ref:`is_flipped_v<class_SpriteBase3D_is_flipped_v>` **(** **)** const |
  37. +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+
  38. | void | :ref:`set_alpha_cut_mode<class_SpriteBase3D_set_alpha_cut_mode>` **(** :ref:`int<class_int>` mode **)** |
  39. +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+
  40. | void | :ref:`set_axis<class_SpriteBase3D_set_axis>` **(** :ref:`int<class_int>` axis **)** |
  41. +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+
  42. | void | :ref:`set_centered<class_SpriteBase3D_set_centered>` **(** :ref:`bool<class_bool>` centered **)** |
  43. +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+
  44. | void | :ref:`set_draw_flag<class_SpriteBase3D_set_draw_flag>` **(** :ref:`int<class_int>` flag, :ref:`bool<class_bool>` enabled **)** |
  45. +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+
  46. | void | :ref:`set_flip_h<class_SpriteBase3D_set_flip_h>` **(** :ref:`bool<class_bool>` flip_h **)** |
  47. +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+
  48. | void | :ref:`set_flip_v<class_SpriteBase3D_set_flip_v>` **(** :ref:`bool<class_bool>` flip_v **)** |
  49. +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+
  50. | void | :ref:`set_modulate<class_SpriteBase3D_set_modulate>` **(** :ref:`Color<class_color>` modulate **)** |
  51. +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+
  52. | void | :ref:`set_offset<class_SpriteBase3D_set_offset>` **(** :ref:`Vector2<class_vector2>` offset **)** |
  53. +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+
  54. | void | :ref:`set_opacity<class_SpriteBase3D_set_opacity>` **(** :ref:`float<class_float>` opacity **)** |
  55. +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+
  56. | void | :ref:`set_pixel_size<class_SpriteBase3D_set_pixel_size>` **(** :ref:`float<class_float>` pixel_size **)** |
  57. +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------+
  58. Member Variables
  59. ----------------
  60. - :ref:`int<class_int>` **alpha_cut**
  61. - :ref:`int<class_int>` **axis** - The direction in which the front of the texture faces.
  62. - :ref:`bool<class_bool>` **centered** - If ``true`` texture will be centered. Default value: ``true``.
  63. - :ref:`bool<class_bool>` **double_sided** - If ``true`` texture can be seen from the back as well, if ``false``, it is invisible when looking at it from behind. Default value: ``true``.
  64. - :ref:`bool<class_bool>` **flip_h** - If ``true`` texture is flipped horizontally. Default value: ``false``.
  65. - :ref:`bool<class_bool>` **flip_v** - If ``true`` texture is flipped vertically. Default value: ``false``.
  66. - :ref:`Color<class_color>` **modulate** - A color value that gets multiplied on, could be used for mood-coloring or to simulate the color of light.
  67. - :ref:`Vector2<class_vector2>` **offset** - The texture's drawing offset.
  68. - :ref:`float<class_float>` **opacity** - The objects visibility on a scale from ``0`` fully invisible to ``1`` fully visible.
  69. - :ref:`float<class_float>` **pixel_size** - The size of one pixel's width on the Sprite to scale it in 3D.
  70. - :ref:`bool<class_bool>` **shaded** - If ``true`` the :ref:`Light<class_light>` in the :ref:`Environment<class_environment>` has effects on the Sprite. Default value: ``false``.
  71. - :ref:`bool<class_bool>` **transparent** - If ``true`` the texture's transparency and the opacity are used to make those parts of the Sprite invisible. Default value: ``true``.
  72. Numeric Constants
  73. -----------------
  74. - **FLAG_TRANSPARENT** = **0** --- If set, the texture's transparency and the opacity are used to make those parts of the Sprite invisible.
  75. - **FLAG_SHADED** = **1** --- If set, the Light in the Environment has effects on the Sprite.
  76. - **FLAG_DOUBLE_SIDED** = **2** --- If set, texture can be seen from the back as well, if not, it is invisible when looking at it from behind.
  77. - **FLAG_MAX** = **3** --- Used internally to mark the end of the Flags section.
  78. - **ALPHA_CUT_DISABLED** = **0**
  79. - **ALPHA_CUT_DISCARD** = **1**
  80. - **ALPHA_CUT_OPAQUE_PREPASS** = **2**
  81. Description
  82. -----------
  83. A node that displays 2D texture information in a 3D environment.
  84. Member Function Description
  85. ---------------------------
  86. .. _class_SpriteBase3D_get_alpha_cut_mode:
  87. - :ref:`int<class_int>` **get_alpha_cut_mode** **(** **)** const
  88. .. _class_SpriteBase3D_get_axis:
  89. - :ref:`int<class_int>` **get_axis** **(** **)** const
  90. .. _class_SpriteBase3D_get_draw_flag:
  91. - :ref:`bool<class_bool>` **get_draw_flag** **(** :ref:`int<class_int>` flag **)** const
  92. .. _class_SpriteBase3D_get_item_rect:
  93. - :ref:`Rect2<class_rect2>` **get_item_rect** **(** **)** const
  94. .. _class_SpriteBase3D_get_modulate:
  95. - :ref:`Color<class_color>` **get_modulate** **(** **)** const
  96. .. _class_SpriteBase3D_get_offset:
  97. - :ref:`Vector2<class_vector2>` **get_offset** **(** **)** const
  98. .. _class_SpriteBase3D_get_opacity:
  99. - :ref:`float<class_float>` **get_opacity** **(** **)** const
  100. .. _class_SpriteBase3D_get_pixel_size:
  101. - :ref:`float<class_float>` **get_pixel_size** **(** **)** const
  102. .. _class_SpriteBase3D_is_centered:
  103. - :ref:`bool<class_bool>` **is_centered** **(** **)** const
  104. .. _class_SpriteBase3D_is_flipped_h:
  105. - :ref:`bool<class_bool>` **is_flipped_h** **(** **)** const
  106. .. _class_SpriteBase3D_is_flipped_v:
  107. - :ref:`bool<class_bool>` **is_flipped_v** **(** **)** const
  108. .. _class_SpriteBase3D_set_alpha_cut_mode:
  109. - void **set_alpha_cut_mode** **(** :ref:`int<class_int>` mode **)**
  110. .. _class_SpriteBase3D_set_axis:
  111. - void **set_axis** **(** :ref:`int<class_int>` axis **)**
  112. .. _class_SpriteBase3D_set_centered:
  113. - void **set_centered** **(** :ref:`bool<class_bool>` centered **)**
  114. .. _class_SpriteBase3D_set_draw_flag:
  115. - void **set_draw_flag** **(** :ref:`int<class_int>` flag, :ref:`bool<class_bool>` enabled **)**
  116. .. _class_SpriteBase3D_set_flip_h:
  117. - void **set_flip_h** **(** :ref:`bool<class_bool>` flip_h **)**
  118. .. _class_SpriteBase3D_set_flip_v:
  119. - void **set_flip_v** **(** :ref:`bool<class_bool>` flip_v **)**
  120. .. _class_SpriteBase3D_set_modulate:
  121. - void **set_modulate** **(** :ref:`Color<class_color>` modulate **)**
  122. .. _class_SpriteBase3D_set_offset:
  123. - void **set_offset** **(** :ref:`Vector2<class_vector2>` offset **)**
  124. .. _class_SpriteBase3D_set_opacity:
  125. - void **set_opacity** **(** :ref:`float<class_float>` opacity **)**
  126. .. _class_SpriteBase3D_set_pixel_size:
  127. - void **set_pixel_size** **(** :ref:`float<class_float>` pixel_size **)**