mirror of
https://github.com/stan220/godot-docs.git
synced 2026-09-08 20:29:03 +00:00
103 lines
3.5 KiB
ReStructuredText
103 lines
3.5 KiB
ReStructuredText
.. Generated automatically by doc/tools/makerst.py in Godot's source tree.
|
|
.. DO NOT EDIT THIS FILE, but the CSGShape.xml source instead.
|
|
.. The source is found in doc/classes or modules/<name>/doc_classes.
|
|
|
|
.. _class_CSGShape:
|
|
|
|
CSGShape
|
|
========
|
|
|
|
**Inherits:** :ref:`VisualInstance<class_VisualInstance>` **<** :ref:`Spatial<class_Spatial>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
|
|
|
**Inherited By:** :ref:`CSGCombiner<class_CSGCombiner>`, :ref:`CSGPrimitive<class_CSGPrimitive>`
|
|
|
|
**Category:** Core
|
|
|
|
Brief Description
|
|
-----------------
|
|
|
|
The CSG base class.
|
|
|
|
Properties
|
|
----------
|
|
|
|
+-------------------------------------------+----------------------------------------------------+
|
|
| :ref:`Operation<enum_CSGShape_Operation>` | :ref:`operation<class_CSGShape_operation>` |
|
|
+-------------------------------------------+----------------------------------------------------+
|
|
| :ref:`float<class_float>` | :ref:`snap<class_CSGShape_snap>` |
|
|
+-------------------------------------------+----------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`use_collision<class_CSGShape_use_collision>` |
|
|
+-------------------------------------------+----------------------------------------------------+
|
|
|
|
Methods
|
|
-------
|
|
|
|
+--------------------------+----------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`is_root_shape<class_CSGShape_is_root_shape>` **(** **)** const |
|
|
+--------------------------+----------------------------------------------------------------------+
|
|
|
|
Enumerations
|
|
------------
|
|
|
|
.. _enum_CSGShape_Operation:
|
|
|
|
enum **Operation**:
|
|
|
|
- **OPERATION_UNION** = **0** --- Geometry of both primitives is merged, intersecting geometry is removed.
|
|
|
|
- **OPERATION_INTERSECTION** = **1** --- Only intersecting geometry remains, the rest is removed.
|
|
|
|
- **OPERATION_SUBTRACTION** = **2** --- The second shape is susbtracted from the first, leaving a dent with it's shape.
|
|
|
|
Description
|
|
-----------
|
|
|
|
This is the CSG base class that provides CSG operation support to the various CSG nodes in Godot.
|
|
|
|
Property Descriptions
|
|
---------------------
|
|
|
|
.. _class_CSGShape_operation:
|
|
|
|
- :ref:`Operation<enum_CSGShape_Operation>` **operation**
|
|
|
|
+----------+----------------------+
|
|
| *Setter* | set_operation(value) |
|
|
+----------+----------------------+
|
|
| *Getter* | get_operation() |
|
|
+----------+----------------------+
|
|
|
|
The operation that is performed on this shape. This is ignored for the first CSG child node as the operation is between this node and the previous child of this nodes parent.
|
|
|
|
.. _class_CSGShape_snap:
|
|
|
|
- :ref:`float<class_float>` **snap**
|
|
|
|
+----------+-----------------+
|
|
| *Setter* | set_snap(value) |
|
|
+----------+-----------------+
|
|
| *Getter* | get_snap() |
|
|
+----------+-----------------+
|
|
|
|
.. _class_CSGShape_use_collision:
|
|
|
|
- :ref:`bool<class_bool>` **use_collision**
|
|
|
|
+----------+--------------------------+
|
|
| *Setter* | set_use_collision(value) |
|
|
+----------+--------------------------+
|
|
| *Getter* | is_using_collision() |
|
|
+----------+--------------------------+
|
|
|
|
Adds a collision shape to the physics engine for our CSG shape. This will always act like a static body. Note that the collision shape is still active even if the CSG shape itself is hidden.
|
|
|
|
Method Descriptions
|
|
-------------------
|
|
|
|
.. _class_CSGShape_is_root_shape:
|
|
|
|
- :ref:`bool<class_bool>` **is_root_shape** **(** **)** const
|
|
|
|
Returns true if this is a root shape and is thus the object that is rendered.
|
|
|