class_geometryinstance.rst 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the GeometryInstance.xml source instead.
  3. .. The source is found in doc/classes or modules/<name>/doc_classes.
  4. .. _class_GeometryInstance:
  5. GeometryInstance
  6. ================
  7. **Inherits:** :ref:`VisualInstance<class_VisualInstance>` **<** :ref:`Spatial<class_Spatial>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  8. **Inherited By:** :ref:`CPUParticles<class_CPUParticles>`, :ref:`CSGShape<class_CSGShape>`, :ref:`ImmediateGeometry<class_ImmediateGeometry>`, :ref:`MeshInstance<class_MeshInstance>`, :ref:`MultiMeshInstance<class_MultiMeshInstance>`, :ref:`Particles<class_Particles>`, :ref:`SpriteBase3D<class_SpriteBase3D>`
  9. **Category:** Core
  10. Brief Description
  11. -----------------
  12. Base node for geometry based visual instances.
  13. Properties
  14. ----------
  15. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------+
  16. | :ref:`ShadowCastingSetting<enum_GeometryInstance_ShadowCastingSetting>` | :ref:`cast_shadow<class_GeometryInstance_property_cast_shadow>` |
  17. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------+
  18. | :ref:`float<class_float>` | :ref:`extra_cull_margin<class_GeometryInstance_property_extra_cull_margin>` |
  19. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------+
  20. | :ref:`float<class_float>` | :ref:`lod_max_distance<class_GeometryInstance_property_lod_max_distance>` |
  21. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------+
  22. | :ref:`float<class_float>` | :ref:`lod_max_hysteresis<class_GeometryInstance_property_lod_max_hysteresis>` |
  23. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------+
  24. | :ref:`float<class_float>` | :ref:`lod_min_distance<class_GeometryInstance_property_lod_min_distance>` |
  25. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------+
  26. | :ref:`float<class_float>` | :ref:`lod_min_hysteresis<class_GeometryInstance_property_lod_min_hysteresis>` |
  27. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------+
  28. | :ref:`Material<class_Material>` | :ref:`material_override<class_GeometryInstance_property_material_override>` |
  29. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------+
  30. | :ref:`bool<class_bool>` | :ref:`use_in_baked_light<class_GeometryInstance_property_use_in_baked_light>` |
  31. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------+
  32. Methods
  33. -------
  34. +------+----------------------------------------------------------------------------------------------------------------+
  35. | void | :ref:`set_custom_aabb<class_GeometryInstance_method_set_custom_aabb>` **(** :ref:`AABB<class_AABB>` aabb **)** |
  36. +------+----------------------------------------------------------------------------------------------------------------+
  37. Enumerations
  38. ------------
  39. .. _enum_GeometryInstance_ShadowCastingSetting:
  40. .. _class_GeometryInstance_constant_SHADOW_CASTING_SETTING_OFF:
  41. .. _class_GeometryInstance_constant_SHADOW_CASTING_SETTING_ON:
  42. .. _class_GeometryInstance_constant_SHADOW_CASTING_SETTING_DOUBLE_SIDED:
  43. .. _class_GeometryInstance_constant_SHADOW_CASTING_SETTING_SHADOWS_ONLY:
  44. enum **ShadowCastingSetting**:
  45. - **SHADOW_CASTING_SETTING_OFF** = **0** --- Will not cast any shadows.
  46. - **SHADOW_CASTING_SETTING_ON** = **1** --- Will cast shadows from all visible faces in the GeometryInstance.
  47. Will take culling into account, so faces not being rendered will not be taken into account when shadow casting.
  48. - **SHADOW_CASTING_SETTING_DOUBLE_SIDED** = **2** --- Will cast shadows from all visible faces in the GeometryInstance.
  49. Will not take culling into account, so all faces will be taken into account when shadow casting.
  50. - **SHADOW_CASTING_SETTING_SHADOWS_ONLY** = **3** --- Will only show the shadows casted from this object.
  51. In other words: The actual mesh will not be visible, only the shadows casted from the mesh.
  52. .. _enum_GeometryInstance_Flags:
  53. .. _class_GeometryInstance_constant_FLAG_USE_BAKED_LIGHT:
  54. .. _class_GeometryInstance_constant_FLAG_MAX:
  55. enum **Flags**:
  56. - **FLAG_USE_BAKED_LIGHT** = **0** --- Will allow the GeometryInstance to be used when baking lights using a :ref:`GIProbe<class_GIProbe>` and/or any other form of baked lighting.
  57. Added documentation for GeometryInstance and VisualInstance
  58. - **FLAG_MAX** = **2**
  59. Description
  60. -----------
  61. Base node for geometry based visual instances. Shares some common functionality like visibility and custom materials.
  62. Property Descriptions
  63. ---------------------
  64. .. _class_GeometryInstance_property_cast_shadow:
  65. - :ref:`ShadowCastingSetting<enum_GeometryInstance_ShadowCastingSetting>` **cast_shadow**
  66. +----------+---------------------------------+
  67. | *Setter* | set_cast_shadows_setting(value) |
  68. +----------+---------------------------------+
  69. | *Getter* | get_cast_shadows_setting() |
  70. +----------+---------------------------------+
  71. The selected shadow casting flag. See SHADOW_CASTING_SETTING\_\* constants for values.
  72. .. _class_GeometryInstance_property_extra_cull_margin:
  73. - :ref:`float<class_float>` **extra_cull_margin**
  74. +----------+------------------------------+
  75. | *Setter* | set_extra_cull_margin(value) |
  76. +----------+------------------------------+
  77. | *Getter* | get_extra_cull_margin() |
  78. +----------+------------------------------+
  79. The extra distance added to the GeometryInstance's bounding box (:ref:`AABB<class_AABB>`) to increase its cull box.
  80. .. _class_GeometryInstance_property_lod_max_distance:
  81. - :ref:`float<class_float>` **lod_max_distance**
  82. +----------+-----------------------------+
  83. | *Setter* | set_lod_max_distance(value) |
  84. +----------+-----------------------------+
  85. | *Getter* | get_lod_max_distance() |
  86. +----------+-----------------------------+
  87. The GeometryInstance's max LOD distance.
  88. .. _class_GeometryInstance_property_lod_max_hysteresis:
  89. - :ref:`float<class_float>` **lod_max_hysteresis**
  90. +----------+-------------------------------+
  91. | *Setter* | set_lod_max_hysteresis(value) |
  92. +----------+-------------------------------+
  93. | *Getter* | get_lod_max_hysteresis() |
  94. +----------+-------------------------------+
  95. The GeometryInstance's max LOD margin.
  96. .. _class_GeometryInstance_property_lod_min_distance:
  97. - :ref:`float<class_float>` **lod_min_distance**
  98. +----------+-----------------------------+
  99. | *Setter* | set_lod_min_distance(value) |
  100. +----------+-----------------------------+
  101. | *Getter* | get_lod_min_distance() |
  102. +----------+-----------------------------+
  103. The GeometryInstance's min LOD distance.
  104. .. _class_GeometryInstance_property_lod_min_hysteresis:
  105. - :ref:`float<class_float>` **lod_min_hysteresis**
  106. +----------+-------------------------------+
  107. | *Setter* | set_lod_min_hysteresis(value) |
  108. +----------+-------------------------------+
  109. | *Getter* | get_lod_min_hysteresis() |
  110. +----------+-------------------------------+
  111. The GeometryInstance's min LOD margin.
  112. .. _class_GeometryInstance_property_material_override:
  113. - :ref:`Material<class_Material>` **material_override**
  114. +----------+------------------------------+
  115. | *Setter* | set_material_override(value) |
  116. +----------+------------------------------+
  117. | *Getter* | get_material_override() |
  118. +----------+------------------------------+
  119. The material override for the whole geometry.
  120. If there is a material in material_override, it will be used instead of any material set in any material slot of the mesh.
  121. .. _class_GeometryInstance_property_use_in_baked_light:
  122. - :ref:`bool<class_bool>` **use_in_baked_light**
  123. +----------+-----------------+
  124. | *Setter* | set_flag(value) |
  125. +----------+-----------------+
  126. | *Getter* | get_flag() |
  127. +----------+-----------------+
  128. If ``true``, this GeometryInstance will be used when baking lights using a :ref:`GIProbe<class_GIProbe>` and/or any other form of baked lighting.
  129. Method Descriptions
  130. -------------------
  131. .. _class_GeometryInstance_method_set_custom_aabb:
  132. - void **set_custom_aabb** **(** :ref:`AABB<class_AABB>` aabb **)**
  133. Overrides the bounding box of this node with a custom one. To remove it, set an AABB with all fields set to zero.