class_boxmesh.rst 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  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. Description
  12. -----------
  13. Generate an axis-aligned box :ref:`PrimitiveMesh<class_PrimitiveMesh>`.
  14. 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)``.
  15. \ **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.
  16. Properties
  17. ----------
  18. +-------------------------------+------------------------------------------------------------------+----------------------+
  19. | :ref:`Vector3<class_Vector3>` | :ref:`size<class_BoxMesh_property_size>` | ``Vector3(1, 1, 1)`` |
  20. +-------------------------------+------------------------------------------------------------------+----------------------+
  21. | :ref:`int<class_int>` | :ref:`subdivide_depth<class_BoxMesh_property_subdivide_depth>` | ``0`` |
  22. +-------------------------------+------------------------------------------------------------------+----------------------+
  23. | :ref:`int<class_int>` | :ref:`subdivide_height<class_BoxMesh_property_subdivide_height>` | ``0`` |
  24. +-------------------------------+------------------------------------------------------------------+----------------------+
  25. | :ref:`int<class_int>` | :ref:`subdivide_width<class_BoxMesh_property_subdivide_width>` | ``0`` |
  26. +-------------------------------+------------------------------------------------------------------+----------------------+
  27. Property Descriptions
  28. ---------------------
  29. .. _class_BoxMesh_property_size:
  30. - :ref:`Vector3<class_Vector3>` **size**
  31. +-----------+----------------------+
  32. | *Default* | ``Vector3(1, 1, 1)`` |
  33. +-----------+----------------------+
  34. | *Setter* | set_size(value) |
  35. +-----------+----------------------+
  36. | *Getter* | get_size() |
  37. +-----------+----------------------+
  38. The box's width, height and depth.
  39. ----
  40. .. _class_BoxMesh_property_subdivide_depth:
  41. - :ref:`int<class_int>` **subdivide_depth**
  42. +-----------+----------------------------+
  43. | *Default* | ``0`` |
  44. +-----------+----------------------------+
  45. | *Setter* | set_subdivide_depth(value) |
  46. +-----------+----------------------------+
  47. | *Getter* | get_subdivide_depth() |
  48. +-----------+----------------------------+
  49. Number of extra edge loops inserted along the Z axis.
  50. ----
  51. .. _class_BoxMesh_property_subdivide_height:
  52. - :ref:`int<class_int>` **subdivide_height**
  53. +-----------+-----------------------------+
  54. | *Default* | ``0`` |
  55. +-----------+-----------------------------+
  56. | *Setter* | set_subdivide_height(value) |
  57. +-----------+-----------------------------+
  58. | *Getter* | get_subdivide_height() |
  59. +-----------+-----------------------------+
  60. Number of extra edge loops inserted along the Y axis.
  61. ----
  62. .. _class_BoxMesh_property_subdivide_width:
  63. - :ref:`int<class_int>` **subdivide_width**
  64. +-----------+----------------------------+
  65. | *Default* | ``0`` |
  66. +-----------+----------------------------+
  67. | *Setter* | set_subdivide_width(value) |
  68. +-----------+----------------------------+
  69. | *Getter* | get_subdivide_width() |
  70. +-----------+----------------------------+
  71. Number of extra edge loops inserted along the X axis.
  72. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  73. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  74. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  75. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  76. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  77. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`