class_csgmesh3d.rst 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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 CSGMesh3D.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_CSGMesh3D:
  6. CSGMesh3D
  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 Mesh shape that uses a mesh resource.
  10. Description
  11. -----------
  12. This CSG node allows you to use any mesh resource as a CSG shape, provided it is closed, does not self-intersect, does not contain internal faces and has no edges that connect to more than two faces.
  13. Properties
  14. ----------
  15. +---------------------------------+----------------------------------------------------+
  16. | :ref:`Material<class_Material>` | :ref:`material<class_CSGMesh3D_property_material>` |
  17. +---------------------------------+----------------------------------------------------+
  18. | :ref:`Mesh<class_Mesh>` | :ref:`mesh<class_CSGMesh3D_property_mesh>` |
  19. +---------------------------------+----------------------------------------------------+
  20. Property Descriptions
  21. ---------------------
  22. .. _class_CSGMesh3D_property_material:
  23. - :ref:`Material<class_Material>` **material**
  24. +----------+---------------------+
  25. | *Setter* | set_material(value) |
  26. +----------+---------------------+
  27. | *Getter* | get_material() |
  28. +----------+---------------------+
  29. The :ref:`Material<class_Material>` used in drawing the CSG shape.
  30. ----
  31. .. _class_CSGMesh3D_property_mesh:
  32. - :ref:`Mesh<class_Mesh>` **mesh**
  33. +----------+-----------------+
  34. | *Setter* | set_mesh(value) |
  35. +----------+-----------------+
  36. | *Getter* | get_mesh() |
  37. +----------+-----------------+
  38. The :ref:`Mesh<class_Mesh>` resource to use as a CSG shape.
  39. **Note:** When using an :ref:`ArrayMesh<class_ArrayMesh>`, avoid meshes with vertex normals unless a flat shader is required. By default, CSGMesh will ignore the mesh's vertex normals and use a smooth shader calculated using the faces' normals. If a flat shader is required, ensure that all faces' vertex normals are parallel.
  40. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  41. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  42. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  43. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  44. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  45. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`