class_csgbox3d.rst 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/make_rst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the CSGBox3D.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_CSGBox3D:
  6. CSGBox3D
  7. ========
  8. **Inherits:** :ref:`CSGPrimitive3D<class_CSGPrimitive3D>` **<** :ref:`CSGShape3D<class_CSGShape3D>` **<** :ref:`GeometryInstance3D<class_GeometryInstance3D>` **<** :ref:`VisualInstance3D<class_VisualInstance3D>` **<** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  9. A CSG Box shape.
  10. Description
  11. -----------
  12. This node allows you to create a box for use with the CSG system.
  13. \ **Note:** CSG nodes are intended to be used for level prototyping. Creating CSG nodes has a significant CPU cost compared to creating a :ref:`MeshInstance3D<class_MeshInstance3D>` with a :ref:`PrimitiveMesh<class_PrimitiveMesh>`. Moving a CSG node within another CSG node also has a significant CPU cost, so it should be avoided during gameplay.
  14. Tutorials
  15. ---------
  16. - :doc:`Prototyping levels with CSG <../tutorials/3d/csg_tools>`
  17. Properties
  18. ----------
  19. +---------------------------------+---------------------------------------------------+----------------------+
  20. | :ref:`Material<class_Material>` | :ref:`material<class_CSGBox3D_property_material>` | |
  21. +---------------------------------+---------------------------------------------------+----------------------+
  22. | :ref:`Vector3<class_Vector3>` | :ref:`size<class_CSGBox3D_property_size>` | ``Vector3(1, 1, 1)`` |
  23. +---------------------------------+---------------------------------------------------+----------------------+
  24. Property Descriptions
  25. ---------------------
  26. .. _class_CSGBox3D_property_material:
  27. - :ref:`Material<class_Material>` **material**
  28. +----------+---------------------+
  29. | *Setter* | set_material(value) |
  30. +----------+---------------------+
  31. | *Getter* | get_material() |
  32. +----------+---------------------+
  33. The material used to render the box.
  34. ----
  35. .. _class_CSGBox3D_property_size:
  36. - :ref:`Vector3<class_Vector3>` **size**
  37. +-----------+----------------------+
  38. | *Default* | ``Vector3(1, 1, 1)`` |
  39. +-----------+----------------------+
  40. | *Setter* | set_size(value) |
  41. +-----------+----------------------+
  42. | *Getter* | get_size() |
  43. +-----------+----------------------+
  44. The box's width, height and depth.
  45. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  46. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  47. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  48. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  49. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  50. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`