virtualx-engine-docs/_sources/classes/class_csgprimitive.rst.txt
2024-10-23 09:41:33 -07:00

72 lines
3 KiB
ReStructuredText

:github_url: hide
.. DO NOT EDIT THIS FILE!!!
.. Generated automatically from Godot engine sources.
.. Generator: https://github.com/godotengine/godot/tree/3.6/doc/tools/make_rst.py.
.. XML source: https://github.com/godotengine/godot/tree/3.6/modules/csg/doc_classes/CSGPrimitive.xml.
.. _class_CSGPrimitive:
CSGPrimitive
============
**Inherits:** :ref:`CSGShape<class_CSGShape>` **<** :ref:`GeometryInstance<class_GeometryInstance>` **<** :ref:`VisualInstance<class_VisualInstance>` **<** :ref:`CullInstance<class_CullInstance>` **<** :ref:`Spatial<class_Spatial>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
**Inherited By:** :ref:`CSGBox<class_CSGBox>`, :ref:`CSGCylinder<class_CSGCylinder>`, :ref:`CSGMesh<class_CSGMesh>`, :ref:`CSGPolygon<class_CSGPolygon>`, :ref:`CSGSphere<class_CSGSphere>`, :ref:`CSGTorus<class_CSGTorus>`
Base class for CSG primitives.
.. rst-class:: classref-introduction-group
Description
-----------
Parent class for various CSG primitives. It contains code and functionality that is common between them. It cannot be used directly. Instead use one of the various classes that inherit from it.
\ **Note:** CSG nodes are intended to be used for level prototyping. Creating CSG nodes has a significant CPU cost compared to creating a :ref:`MeshInstance<class_MeshInstance>` 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.
.. rst-class:: classref-introduction-group
Tutorials
---------
- :doc:`Prototyping levels with CSG <../tutorials/3d/csg_tools>`
.. rst-class:: classref-reftable-group
Properties
----------
.. table::
:widths: auto
+-------------------------+---------------------------------------------------------------+-----------+
| :ref:`bool<class_bool>` | :ref:`invert_faces<class_CSGPrimitive_property_invert_faces>` | ``false`` |
+-------------------------+---------------------------------------------------------------+-----------+
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Property Descriptions
---------------------
.. _class_CSGPrimitive_property_invert_faces:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **invert_faces** = ``false``
.. rst-class:: classref-property-setget
- void **set_invert_faces** **(** :ref:`bool<class_bool>` value **)**
- :ref:`bool<class_bool>` **is_inverting_faces** **(** **)**
Invert the faces of the mesh.
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`