class_boxmesh.rst 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/BoxMesh.xml.
  6. .. _class_BoxMesh:
  7. BoxMesh
  8. =======
  9. **Inherits:** :ref:`PrimitiveMesh<class_PrimitiveMesh>` **<** :ref:`Mesh<class_Mesh>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. Generate an axis-aligned box :ref:`PrimitiveMesh<class_PrimitiveMesh>`.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. Generate an axis-aligned box :ref:`PrimitiveMesh<class_PrimitiveMesh>`.
  15. The box's UV layout is arranged in a 3×2 layout that allows texturing each face individually. To apply the same texture on all faces, change the material's UV property to ``Vector3(3, 2, 1)``. This is equivalent to adding ``UV *= vec2(3.0, 2.0)`` in a vertex shader.
  16. \ **Note:** When using a large textured **BoxMesh** (e.g. as a floor), you may stumble upon UV jittering issues depending on the camera angle. To solve this, increase :ref:`subdivide_depth<class_BoxMesh_property_subdivide_depth>`, :ref:`subdivide_height<class_BoxMesh_property_subdivide_height>` and :ref:`subdivide_width<class_BoxMesh_property_subdivide_width>` until you no longer notice UV jittering.
  17. .. rst-class:: classref-reftable-group
  18. Properties
  19. ----------
  20. .. table::
  21. :widths: auto
  22. +-------------------------------+------------------------------------------------------------------+----------------------+
  23. | :ref:`Vector3<class_Vector3>` | :ref:`size<class_BoxMesh_property_size>` | ``Vector3(1, 1, 1)`` |
  24. +-------------------------------+------------------------------------------------------------------+----------------------+
  25. | :ref:`int<class_int>` | :ref:`subdivide_depth<class_BoxMesh_property_subdivide_depth>` | ``0`` |
  26. +-------------------------------+------------------------------------------------------------------+----------------------+
  27. | :ref:`int<class_int>` | :ref:`subdivide_height<class_BoxMesh_property_subdivide_height>` | ``0`` |
  28. +-------------------------------+------------------------------------------------------------------+----------------------+
  29. | :ref:`int<class_int>` | :ref:`subdivide_width<class_BoxMesh_property_subdivide_width>` | ``0`` |
  30. +-------------------------------+------------------------------------------------------------------+----------------------+
  31. .. rst-class:: classref-section-separator
  32. ----
  33. .. rst-class:: classref-descriptions-group
  34. Property Descriptions
  35. ---------------------
  36. .. _class_BoxMesh_property_size:
  37. .. rst-class:: classref-property
  38. :ref:`Vector3<class_Vector3>` **size** = ``Vector3(1, 1, 1)`` :ref:`🔗<class_BoxMesh_property_size>`
  39. .. rst-class:: classref-property-setget
  40. - |void| **set_size**\ (\ value\: :ref:`Vector3<class_Vector3>`\ )
  41. - :ref:`Vector3<class_Vector3>` **get_size**\ (\ )
  42. The box's width, height and depth.
  43. .. rst-class:: classref-item-separator
  44. ----
  45. .. _class_BoxMesh_property_subdivide_depth:
  46. .. rst-class:: classref-property
  47. :ref:`int<class_int>` **subdivide_depth** = ``0`` :ref:`🔗<class_BoxMesh_property_subdivide_depth>`
  48. .. rst-class:: classref-property-setget
  49. - |void| **set_subdivide_depth**\ (\ value\: :ref:`int<class_int>`\ )
  50. - :ref:`int<class_int>` **get_subdivide_depth**\ (\ )
  51. Number of extra edge loops inserted along the Z axis.
  52. .. rst-class:: classref-item-separator
  53. ----
  54. .. _class_BoxMesh_property_subdivide_height:
  55. .. rst-class:: classref-property
  56. :ref:`int<class_int>` **subdivide_height** = ``0`` :ref:`🔗<class_BoxMesh_property_subdivide_height>`
  57. .. rst-class:: classref-property-setget
  58. - |void| **set_subdivide_height**\ (\ value\: :ref:`int<class_int>`\ )
  59. - :ref:`int<class_int>` **get_subdivide_height**\ (\ )
  60. Number of extra edge loops inserted along the Y axis.
  61. .. rst-class:: classref-item-separator
  62. ----
  63. .. _class_BoxMesh_property_subdivide_width:
  64. .. rst-class:: classref-property
  65. :ref:`int<class_int>` **subdivide_width** = ``0`` :ref:`🔗<class_BoxMesh_property_subdivide_width>`
  66. .. rst-class:: classref-property-setget
  67. - |void| **set_subdivide_width**\ (\ value\: :ref:`int<class_int>`\ )
  68. - :ref:`int<class_int>` **get_subdivide_width**\ (\ )
  69. Number of extra edge loops inserted along the X axis.
  70. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  71. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  72. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  73. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  74. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  75. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  76. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  77. .. |void| replace:: :abbr:`void (No return value.)`