2
0

class_csgmesh3d.rst 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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/modules/csg/doc_classes/CSGMesh3D.xml.
  6. .. _class_CSGMesh3D:
  7. CSGMesh3D
  8. =========
  9. **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>`
  10. A CSG Mesh shape that uses a mesh resource.
  11. Description
  12. -----------
  13. 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. See also :ref:`CSGPolygon3D<class_CSGPolygon3D>` for drawing 2D extruded polygons to be used as CSG nodes.
  14. \ **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.
  15. Tutorials
  16. ---------
  17. - :doc:`Prototyping levels with CSG <../tutorials/3d/csg_tools>`
  18. Properties
  19. ----------
  20. +---------------------------------+----------------------------------------------------+
  21. | :ref:`Material<class_Material>` | :ref:`material<class_CSGMesh3D_property_material>` |
  22. +---------------------------------+----------------------------------------------------+
  23. | :ref:`Mesh<class_Mesh>` | :ref:`mesh<class_CSGMesh3D_property_mesh>` |
  24. +---------------------------------+----------------------------------------------------+
  25. Property Descriptions
  26. ---------------------
  27. .. _class_CSGMesh3D_property_material:
  28. - :ref:`Material<class_Material>` **material**
  29. +----------+---------------------+
  30. | *Setter* | set_material(value) |
  31. +----------+---------------------+
  32. | *Getter* | get_material() |
  33. +----------+---------------------+
  34. The :ref:`Material<class_Material>` used in drawing the CSG shape.
  35. ----
  36. .. _class_CSGMesh3D_property_mesh:
  37. - :ref:`Mesh<class_Mesh>` **mesh**
  38. +----------+-----------------+
  39. | *Setter* | set_mesh(value) |
  40. +----------+-----------------+
  41. | *Getter* | get_mesh() |
  42. +----------+-----------------+
  43. The :ref:`Mesh<class_Mesh>` resource to use as a CSG shape.
  44. \ **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.
  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.)`