Files
godot-docs-l10n/classes/es/class_csgshape.rst
Rémi Verschelde cf78697eea Add localized class reference as pre-generated RST files
Currently including `zh_CN` and `es` which both have very high completion
ratios. Others will be added once they reach a significant percentage too.

These RST files will be used by godot-docs in place of its `classes` folder
after we sync with https://github.com/godotengine/godot-docs/pull/5458.

The update workflow is manual for now (example for `zh_CN`):

- Build `godotengine/godot` in the branch we currently track (now `3.x`)
- Run `godot --doctool -l zh_CN`
- Run `cd doc && make rst LANGARG=zh_CN`
- Copy `doc/_build/rst/*` to `classes/zh_CN/` here
- Make sure to have `classes/zh_CN/index.rst` copied from `docs/classes`
2021-12-21 16:07:55 +01:00

229 lines
11 KiB
ReStructuredText

:github_url: hide
.. Generated automatically by doc/tools/make_rst.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:`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:`CSGCombiner<class_CSGCombiner>`, :ref:`CSGPrimitive<class_CSGPrimitive>`
La clase base del CSG.
Descripción
----------------------
Esta es la clase base de CSG que proporciona el soporte de operación de CSG a los diversos nodos de CSG en Godot.
Propiedades
----------------------
+-------------------------------------------+-----------------------------------------------------------------------+-----------+
| :ref:`bool<class_bool>` | :ref:`calculate_tangents<class_CSGShape_property_calculate_tangents>` | ``true`` |
+-------------------------------------------+-----------------------------------------------------------------------+-----------+
| :ref:`int<class_int>` | :ref:`collision_layer<class_CSGShape_property_collision_layer>` | ``1`` |
+-------------------------------------------+-----------------------------------------------------------------------+-----------+
| :ref:`int<class_int>` | :ref:`collision_mask<class_CSGShape_property_collision_mask>` | ``1`` |
+-------------------------------------------+-----------------------------------------------------------------------+-----------+
| :ref:`Operation<enum_CSGShape_Operation>` | :ref:`operation<class_CSGShape_property_operation>` | ``0`` |
+-------------------------------------------+-----------------------------------------------------------------------+-----------+
| :ref:`float<class_float>` | :ref:`snap<class_CSGShape_property_snap>` | ``0.001`` |
+-------------------------------------------+-----------------------------------------------------------------------+-----------+
| :ref:`bool<class_bool>` | :ref:`use_collision<class_CSGShape_property_use_collision>` | ``false`` |
+-------------------------------------------+-----------------------------------------------------------------------+-----------+
Métodos
--------------
+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`get_collision_layer_bit<class_CSGShape_method_get_collision_layer_bit>` **(** :ref:`int<class_int>` bit **)** |const| |
+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`get_collision_mask_bit<class_CSGShape_method_get_collision_mask_bit>` **(** :ref:`int<class_int>` bit **)** |const| |
+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Array<class_Array>` | :ref:`get_meshes<class_CSGShape_method_get_meshes>` **(** **)** |const| |
+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`is_root_shape<class_CSGShape_method_is_root_shape>` **(** **)** |const| |
+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_collision_layer_bit<class_CSGShape_method_set_collision_layer_bit>` **(** :ref:`int<class_int>` bit, :ref:`bool<class_bool>` value **)** |
+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_collision_mask_bit<class_CSGShape_method_set_collision_mask_bit>` **(** :ref:`int<class_int>` bit, :ref:`bool<class_bool>` value **)** |
+---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
Enumeraciones
--------------------------
.. _enum_CSGShape_Operation:
.. _class_CSGShape_constant_OPERATION_UNION:
.. _class_CSGShape_constant_OPERATION_INTERSECTION:
.. _class_CSGShape_constant_OPERATION_SUBTRACTION:
enum **Operation**:
- **OPERATION_UNION** = **0** --- La geometría de ambas primitivas se fusiona, la geometría que se intersecta se elimina.
- **OPERATION_INTERSECTION** = **1** --- Sólo queda la geometría de intersección, el resto se elimina.
- **OPERATION_SUBTRACTION** = **2** --- La segunda forma se resta de la primera, dejando una depresión con su forma.
Descripciones de Propiedades
--------------------------------------------------------
.. _class_CSGShape_property_calculate_tangents:
- :ref:`bool<class_bool>` **calculate_tangents**
+-----------+-------------------------------+
| *Default* | ``true`` |
+-----------+-------------------------------+
| *Setter* | set_calculate_tangents(value) |
+-----------+-------------------------------+
| *Getter* | is_calculating_tangents() |
+-----------+-------------------------------+
Calcular las tangentes para la forma CSG que permite el uso de mapas normales. Esto sólo se aplica a la forma de la raíz, este ajuste se ignora en cualquier hijo.
----
.. _class_CSGShape_property_collision_layer:
- :ref:`int<class_int>` **collision_layer**
+-----------+----------------------------+
| *Default* | ``1`` |
+-----------+----------------------------+
| *Setter* | set_collision_layer(value) |
+-----------+----------------------------+
| *Getter* | get_collision_layer() |
+-----------+----------------------------+
The physics layers this area is in.
Collidable objects can exist in any of 32 different layers. These layers work like a tagging system, and are not visual. A collidable can use these layers to select with which objects it can collide, using the collision_mask property.
A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A. See `Collision layers and masks <../tutorials/physics/physics_introduction.html#collision-layers-and-masks>`__ in the documentation for more information.
----
.. _class_CSGShape_property_collision_mask:
- :ref:`int<class_int>` **collision_mask**
+-----------+---------------------------+
| *Default* | ``1`` |
+-----------+---------------------------+
| *Setter* | set_collision_mask(value) |
+-----------+---------------------------+
| *Getter* | get_collision_mask() |
+-----------+---------------------------+
The physics layers this CSG shape scans for collisions. See `Collision layers and masks <../tutorials/physics/physics_introduction.html#collision-layers-and-masks>`__ in the documentation for more information.
----
.. _class_CSGShape_property_operation:
- :ref:`Operation<enum_CSGShape_Operation>` **operation**
+-----------+----------------------+
| *Default* | ``0`` |
+-----------+----------------------+
| *Setter* | set_operation(value) |
+-----------+----------------------+
| *Getter* | get_operation() |
+-----------+----------------------+
La operación que se realiza en esta forma. Esto se ignora para el primer nodo hijo de CSG ya que la operación es entre este nodo y el hijo previo a este nodo padre.
----
.. _class_CSGShape_property_snap:
- :ref:`float<class_float>` **snap**
+-----------+-----------------+
| *Default* | ``0.001`` |
+-----------+-----------------+
| *Setter* | set_snap(value) |
+-----------+-----------------+
| *Getter* | get_snap() |
+-----------+-----------------+
El recorte hace que la malla se ajuste a una distancia determinada para que las caras de dos mallas puedan estar perfectamente alineadas. Un valor más bajo da como resultado una mayor precisión pero puede ser más difícil de ajustar.
----
.. _class_CSGShape_property_use_collision:
- :ref:`bool<class_bool>` **use_collision**
+-----------+--------------------------+
| *Default* | ``false`` |
+-----------+--------------------------+
| *Setter* | set_use_collision(value) |
+-----------+--------------------------+
| *Getter* | is_using_collision() |
+-----------+--------------------------+
Añade una forma de colisión al motor de física para nuestra forma CSG. Esto siempre actuará como un cuerpo estático. Ten en cuenta que la forma de colisión sigue activa incluso si la propia forma CSG está oculta.
Descripciones de Métodos
------------------------------------------------
.. _class_CSGShape_method_get_collision_layer_bit:
- :ref:`bool<class_bool>` **get_collision_layer_bit** **(** :ref:`int<class_int>` bit **)** |const|
Devuelve un bit individual de la máscara de colisión.
----
.. _class_CSGShape_method_get_collision_mask_bit:
- :ref:`bool<class_bool>` **get_collision_mask_bit** **(** :ref:`int<class_int>` bit **)** |const|
Devuelve un bit individual de la máscara de colisión.
----
.. _class_CSGShape_method_get_meshes:
- :ref:`Array<class_Array>` **get_meshes** **(** **)** |const|
Devuelve un :ref:`Array<class_Array>` con dos elementos, el primero es la :ref:`Transform<class_Transform>` de este nodo y el segundo es la raíz :ref:`Mesh<class_Mesh>` de este nodo. Sólo funciona cuando este nodo es la forma raíz.
----
.. _class_CSGShape_method_is_root_shape:
- :ref:`bool<class_bool>` **is_root_shape** **(** **)** |const|
Devuelve ``true`` si se trata de una forma de raíz y por lo tanto es el objeto que se renderiza.
----
.. _class_CSGShape_method_set_collision_layer_bit:
- void **set_collision_layer_bit** **(** :ref:`int<class_int>` bit, :ref:`bool<class_bool>` value **)**
Establece bits individuales en la máscara de la capa. Utilízala si sólo necesitas cambiar el valor de una capa.
----
.. _class_CSGShape_method_set_collision_mask_bit:
- void **set_collision_mask_bit** **(** :ref:`int<class_int>` bit, :ref:`bool<class_bool>` value **)**
Establece bits individuales en la máscara de colisión. Utilízala si sólo necesitas cambiar el valor de una capa.
.. |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.)`