mirror of
https://github.com/godotengine/godot-docs-l10n.git
synced 2026-01-05 14:10:19 +03:00
482 lines
24 KiB
ReStructuredText
482 lines
24 KiB
ReStructuredText
:github_url: hide
|
|
|
|
.. _class_CSGPolygon3D:
|
|
|
|
CSGPolygon3D
|
|
============
|
|
|
|
**Hereda:** :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>`
|
|
|
|
Extrae una forma de polígono 2D para crear una malla 3D.
|
|
|
|
.. rst-class:: classref-introduction-group
|
|
|
|
Descripción
|
|
----------------------
|
|
|
|
Un array de puntos 2D se extruye para crear rápida y fácilmente una variedad de mallas 3D. Véase también :ref:`CSGMesh3D<class_CSGMesh3D>` para usar mallas 3D como nodos CSG.
|
|
|
|
\ **Nota:** Los nodos CSG están pensados para ser usados para el prototipado de niveles. La creación de nodos CSG tiene un coste de CPU significativo comparado con la creación de una :ref:`MeshInstance3D<class_MeshInstance3D>` con una :ref:`PrimitiveMesh<class_PrimitiveMesh>`. Mover un nodo CSG dentro de otro nodo CSG también tiene un coste de CPU significativo, por lo que debe evitarse durante el juego.
|
|
|
|
.. rst-class:: classref-introduction-group
|
|
|
|
Tutoriales
|
|
--------------------
|
|
|
|
- :doc:`Prototipado de niveles con CSG <../tutorials/3d/csg_tools>`
|
|
|
|
.. rst-class:: classref-reftable-group
|
|
|
|
Propiedades
|
|
----------------------
|
|
|
|
.. table::
|
|
:widths: auto
|
|
|
|
+-------------------------------------------------------------+-----------------------------------------------------------------------------------+------------------------------------------------+
|
|
| :ref:`float<class_float>` | :ref:`depth<class_CSGPolygon3D_property_depth>` | ``1.0`` |
|
|
+-------------------------------------------------------------+-----------------------------------------------------------------------------------+------------------------------------------------+
|
|
| :ref:`Material<class_Material>` | :ref:`material<class_CSGPolygon3D_property_material>` | |
|
|
+-------------------------------------------------------------+-----------------------------------------------------------------------------------+------------------------------------------------+
|
|
| :ref:`Mode<enum_CSGPolygon3D_Mode>` | :ref:`mode<class_CSGPolygon3D_property_mode>` | ``0`` |
|
|
+-------------------------------------------------------------+-----------------------------------------------------------------------------------+------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`path_continuous_u<class_CSGPolygon3D_property_path_continuous_u>` | |
|
|
+-------------------------------------------------------------+-----------------------------------------------------------------------------------+------------------------------------------------+
|
|
| :ref:`float<class_float>` | :ref:`path_interval<class_CSGPolygon3D_property_path_interval>` | |
|
|
+-------------------------------------------------------------+-----------------------------------------------------------------------------------+------------------------------------------------+
|
|
| :ref:`PathIntervalType<enum_CSGPolygon3D_PathIntervalType>` | :ref:`path_interval_type<class_CSGPolygon3D_property_path_interval_type>` | |
|
|
+-------------------------------------------------------------+-----------------------------------------------------------------------------------+------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`path_joined<class_CSGPolygon3D_property_path_joined>` | |
|
|
+-------------------------------------------------------------+-----------------------------------------------------------------------------------+------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`path_local<class_CSGPolygon3D_property_path_local>` | |
|
|
+-------------------------------------------------------------+-----------------------------------------------------------------------------------+------------------------------------------------+
|
|
| :ref:`NodePath<class_NodePath>` | :ref:`path_node<class_CSGPolygon3D_property_path_node>` | |
|
|
+-------------------------------------------------------------+-----------------------------------------------------------------------------------+------------------------------------------------+
|
|
| :ref:`PathRotation<enum_CSGPolygon3D_PathRotation>` | :ref:`path_rotation<class_CSGPolygon3D_property_path_rotation>` | |
|
|
+-------------------------------------------------------------+-----------------------------------------------------------------------------------+------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`path_rotation_accurate<class_CSGPolygon3D_property_path_rotation_accurate>` | |
|
|
+-------------------------------------------------------------+-----------------------------------------------------------------------------------+------------------------------------------------+
|
|
| :ref:`float<class_float>` | :ref:`path_simplify_angle<class_CSGPolygon3D_property_path_simplify_angle>` | |
|
|
+-------------------------------------------------------------+-----------------------------------------------------------------------------------+------------------------------------------------+
|
|
| :ref:`float<class_float>` | :ref:`path_u_distance<class_CSGPolygon3D_property_path_u_distance>` | |
|
|
+-------------------------------------------------------------+-----------------------------------------------------------------------------------+------------------------------------------------+
|
|
| :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`polygon<class_CSGPolygon3D_property_polygon>` | ``PackedVector2Array(0, 0, 0, 1, 1, 1, 1, 0)`` |
|
|
+-------------------------------------------------------------+-----------------------------------------------------------------------------------+------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`smooth_faces<class_CSGPolygon3D_property_smooth_faces>` | ``false`` |
|
|
+-------------------------------------------------------------+-----------------------------------------------------------------------------------+------------------------------------------------+
|
|
| :ref:`float<class_float>` | :ref:`spin_degrees<class_CSGPolygon3D_property_spin_degrees>` | |
|
|
+-------------------------------------------------------------+-----------------------------------------------------------------------------------+------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`spin_sides<class_CSGPolygon3D_property_spin_sides>` | |
|
|
+-------------------------------------------------------------+-----------------------------------------------------------------------------------+------------------------------------------------+
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
Enumeraciones
|
|
--------------------------
|
|
|
|
.. _enum_CSGPolygon3D_Mode:
|
|
|
|
.. rst-class:: classref-enumeration
|
|
|
|
enum **Mode**: :ref:`🔗<enum_CSGPolygon3D_Mode>`
|
|
|
|
.. _class_CSGPolygon3D_constant_MODE_DEPTH:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`Mode<enum_CSGPolygon3D_Mode>` **MODE_DEPTH** = ``0``
|
|
|
|
La forma :ref:`polygon<class_CSGPolygon3D_property_polygon>` se extruye a lo largo del eje Z negativo.
|
|
|
|
.. _class_CSGPolygon3D_constant_MODE_SPIN:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`Mode<enum_CSGPolygon3D_Mode>` **MODE_SPIN** = ``1``
|
|
|
|
La forma :ref:`polygon<class_CSGPolygon3D_property_polygon>` se extruye girándola alrededor del eje Y.
|
|
|
|
.. _class_CSGPolygon3D_constant_MODE_PATH:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`Mode<enum_CSGPolygon3D_Mode>` **MODE_PATH** = ``2``
|
|
|
|
La forma :ref:`polygon<class_CSGPolygon3D_property_polygon>` se extruye a lo largo del :ref:`Path3D<class_Path3D>` especificado en :ref:`path_node<class_CSGPolygon3D_property_path_node>`.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _enum_CSGPolygon3D_PathRotation:
|
|
|
|
.. rst-class:: classref-enumeration
|
|
|
|
enum **PathRotation**: :ref:`🔗<enum_CSGPolygon3D_PathRotation>`
|
|
|
|
.. _class_CSGPolygon3D_constant_PATH_ROTATION_POLYGON:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`PathRotation<enum_CSGPolygon3D_PathRotation>` **PATH_ROTATION_POLYGON** = ``0``
|
|
|
|
La forma :ref:`polygon<class_CSGPolygon3D_property_polygon>` no se rota.
|
|
|
|
\ **Nota:** Requiere que las coordenadas Z de la ruta disminuyan continuamente para asegurar formas viables.
|
|
|
|
.. _class_CSGPolygon3D_constant_PATH_ROTATION_PATH:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`PathRotation<enum_CSGPolygon3D_PathRotation>` **PATH_ROTATION_PATH** = ``1``
|
|
|
|
La forma :ref:`polygon<class_CSGPolygon3D_property_polygon>` se rota a lo largo de la ruta, pero no se rota alrededor del eje de la ruta.
|
|
|
|
\ **Nota:** Requiere que las coordenadas Z de la ruta disminuyan continuamente para asegurar formas viables.
|
|
|
|
.. _class_CSGPolygon3D_constant_PATH_ROTATION_PATH_FOLLOW:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`PathRotation<enum_CSGPolygon3D_PathRotation>` **PATH_ROTATION_PATH_FOLLOW** = ``2``
|
|
|
|
La forma :ref:`polygon<class_CSGPolygon3D_property_polygon>` sigue la ruta y sus rotaciones alrededor del eje de la ruta.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _enum_CSGPolygon3D_PathIntervalType:
|
|
|
|
.. rst-class:: classref-enumeration
|
|
|
|
enum **PathIntervalType**: :ref:`🔗<enum_CSGPolygon3D_PathIntervalType>`
|
|
|
|
.. _class_CSGPolygon3D_constant_PATH_INTERVAL_DISTANCE:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`PathIntervalType<enum_CSGPolygon3D_PathIntervalType>` **PATH_INTERVAL_DISTANCE** = ``0``
|
|
|
|
Cuando :ref:`mode<class_CSGPolygon3D_property_mode>` se establece en :ref:`MODE_PATH<class_CSGPolygon3D_constant_MODE_PATH>`, :ref:`path_interval<class_CSGPolygon3D_property_path_interval>` determinará la distancia, en metros, que se extruirá cada intervalo de la ruta.
|
|
|
|
.. _class_CSGPolygon3D_constant_PATH_INTERVAL_SUBDIVIDE:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`PathIntervalType<enum_CSGPolygon3D_PathIntervalType>` **PATH_INTERVAL_SUBDIVIDE** = ``1``
|
|
|
|
Cuando :ref:`mode<class_CSGPolygon3D_property_mode>` se establece en :ref:`MODE_PATH<class_CSGPolygon3D_constant_MODE_PATH>`, :ref:`path_interval<class_CSGPolygon3D_property_path_interval>` subdividirá los polígonos a lo largo de la ruta.
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
Descripciones de Propiedades
|
|
--------------------------------------------------------
|
|
|
|
.. _class_CSGPolygon3D_property_depth:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`float<class_float>` **depth** = ``1.0`` :ref:`🔗<class_CSGPolygon3D_property_depth>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_depth**\ (\ value\: :ref:`float<class_float>`\ )
|
|
- :ref:`float<class_float>` **get_depth**\ (\ )
|
|
|
|
Cuando :ref:`mode<class_CSGPolygon3D_property_mode>` es :ref:`MODE_DEPTH<class_CSGPolygon3D_constant_MODE_DEPTH>`, la profundidad de la extrusión.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_CSGPolygon3D_property_material:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`Material<class_Material>` **material** :ref:`🔗<class_CSGPolygon3D_property_material>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_material**\ (\ value\: :ref:`Material<class_Material>`\ )
|
|
- :ref:`Material<class_Material>` **get_material**\ (\ )
|
|
|
|
Material a usar para la malla resultante. El UV mapea la mitad superior del material a la forma extruida (U a lo largo de la longitud de las extrusiones y V alrededor del contorno del :ref:`polygon<class_CSGPolygon3D_property_polygon>`), el cuarto inferior izquierdo a la cara del extremo frontal, y el cuarto inferior derecho a la cara del extremo posterior.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_CSGPolygon3D_property_mode:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`Mode<enum_CSGPolygon3D_Mode>` **mode** = ``0`` :ref:`🔗<class_CSGPolygon3D_property_mode>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_mode**\ (\ value\: :ref:`Mode<enum_CSGPolygon3D_Mode>`\ )
|
|
- :ref:`Mode<enum_CSGPolygon3D_Mode>` **get_mode**\ (\ )
|
|
|
|
El :ref:`mode<class_CSGPolygon3D_property_mode>` utilizado para extruir el :ref:`polygon<class_CSGPolygon3D_property_polygon>`.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_CSGPolygon3D_property_path_continuous_u:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`bool<class_bool>` **path_continuous_u** :ref:`🔗<class_CSGPolygon3D_property_path_continuous_u>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_path_continuous_u**\ (\ value\: :ref:`bool<class_bool>`\ )
|
|
- :ref:`bool<class_bool>` **is_path_continuous_u**\ (\ )
|
|
|
|
Cuando :ref:`mode<class_CSGPolygon3D_property_mode>` es :ref:`MODE_PATH<class_CSGPolygon3D_constant_MODE_PATH>`, por defecto, la mitad superior del :ref:`material<class_CSGPolygon3D_property_material>` se estira a lo largo de toda la longitud de la forma extruida. Si es ``false``, la mitad superior del material se repite en cada paso de la extrusión.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_CSGPolygon3D_property_path_interval:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`float<class_float>` **path_interval** :ref:`🔗<class_CSGPolygon3D_property_path_interval>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_path_interval**\ (\ value\: :ref:`float<class_float>`\ )
|
|
- :ref:`float<class_float>` **get_path_interval**\ (\ )
|
|
|
|
Cuando :ref:`mode<class_CSGPolygon3D_property_mode>` es :ref:`MODE_PATH<class_CSGPolygon3D_constant_MODE_PATH>`, el intervalo de ruta o la relación de puntos de ruta a extrusiones.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_CSGPolygon3D_property_path_interval_type:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`PathIntervalType<enum_CSGPolygon3D_PathIntervalType>` **path_interval_type** :ref:`🔗<class_CSGPolygon3D_property_path_interval_type>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_path_interval_type**\ (\ value\: :ref:`PathIntervalType<enum_CSGPolygon3D_PathIntervalType>`\ )
|
|
- :ref:`PathIntervalType<enum_CSGPolygon3D_PathIntervalType>` **get_path_interval_type**\ (\ )
|
|
|
|
Cuando :ref:`mode<class_CSGPolygon3D_property_mode>` es :ref:`MODE_PATH<class_CSGPolygon3D_constant_MODE_PATH>`, esto determinará si el intervalo debe ser por distancia (:ref:`PATH_INTERVAL_DISTANCE<class_CSGPolygon3D_constant_PATH_INTERVAL_DISTANCE>`) o fracciones de subdivisión (:ref:`PATH_INTERVAL_SUBDIVIDE<class_CSGPolygon3D_constant_PATH_INTERVAL_SUBDIVIDE>`).
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_CSGPolygon3D_property_path_joined:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`bool<class_bool>` **path_joined** :ref:`🔗<class_CSGPolygon3D_property_path_joined>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_path_joined**\ (\ value\: :ref:`bool<class_bool>`\ )
|
|
- :ref:`bool<class_bool>` **is_path_joined**\ (\ )
|
|
|
|
Cuando :ref:`mode<class_CSGPolygon3D_property_mode>` es :ref:`MODE_PATH<class_CSGPolygon3D_constant_MODE_PATH>`, si es ``true`` los extremos de la ruta se unen, añadiendo una extrusión entre el último y el primer punto de la ruta.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_CSGPolygon3D_property_path_local:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`bool<class_bool>` **path_local** :ref:`🔗<class_CSGPolygon3D_property_path_local>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_path_local**\ (\ value\: :ref:`bool<class_bool>`\ )
|
|
- :ref:`bool<class_bool>` **is_path_local**\ (\ )
|
|
|
|
Cuando :ref:`mode<class_CSGPolygon3D_property_mode>` es :ref:`MODE_PATH<class_CSGPolygon3D_constant_MODE_PATH>`, si es ``true`` la :ref:`Transform3D<class_Transform3D>` del **CSGPolygon3D** se utiliza como punto de partida para las extrusiones, no la :ref:`Transform3D<class_Transform3D>` del :ref:`path_node<class_CSGPolygon3D_property_path_node>`.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_CSGPolygon3D_property_path_node:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`NodePath<class_NodePath>` **path_node** :ref:`🔗<class_CSGPolygon3D_property_path_node>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_path_node**\ (\ value\: :ref:`NodePath<class_NodePath>`\ )
|
|
- :ref:`NodePath<class_NodePath>` **get_path_node**\ (\ )
|
|
|
|
Cuando :ref:`mode<class_CSGPolygon3D_property_mode>` es :ref:`MODE_PATH<class_CSGPolygon3D_constant_MODE_PATH>`, la ubicación del objeto :ref:`Path3D<class_Path3D>` utilizado para extruir el :ref:`polygon<class_CSGPolygon3D_property_polygon>`.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_CSGPolygon3D_property_path_rotation:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`PathRotation<enum_CSGPolygon3D_PathRotation>` **path_rotation** :ref:`🔗<class_CSGPolygon3D_property_path_rotation>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_path_rotation**\ (\ value\: :ref:`PathRotation<enum_CSGPolygon3D_PathRotation>`\ )
|
|
- :ref:`PathRotation<enum_CSGPolygon3D_PathRotation>` **get_path_rotation**\ (\ )
|
|
|
|
Cuando :ref:`mode<class_CSGPolygon3D_property_mode>` es :ref:`MODE_PATH<class_CSGPolygon3D_constant_MODE_PATH>`, el método de rotación de la ruta utilizado para rotar el :ref:`polygon<class_CSGPolygon3D_property_polygon>` a medida que se extruye.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_CSGPolygon3D_property_path_rotation_accurate:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`bool<class_bool>` **path_rotation_accurate** :ref:`🔗<class_CSGPolygon3D_property_path_rotation_accurate>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_path_rotation_accurate**\ (\ value\: :ref:`bool<class_bool>`\ )
|
|
- :ref:`bool<class_bool>` **get_path_rotation_accurate**\ (\ )
|
|
|
|
Cuando :ref:`mode<class_CSGPolygon3D_property_mode>` es :ref:`MODE_PATH<class_CSGPolygon3D_constant_MODE_PATH>`, si es ``true`` el polígono se rotará de acuerdo con la tangente apropiada de la ruta en los puntos muestreados. Si es ``false``, se utiliza una aproximación, cuya precisión disminuye a medida que disminuye el número de subdivisiones.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_CSGPolygon3D_property_path_simplify_angle:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`float<class_float>` **path_simplify_angle** :ref:`🔗<class_CSGPolygon3D_property_path_simplify_angle>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_path_simplify_angle**\ (\ value\: :ref:`float<class_float>`\ )
|
|
- :ref:`float<class_float>` **get_path_simplify_angle**\ (\ )
|
|
|
|
Cuando :ref:`mode<class_CSGPolygon3D_property_mode>` es :ref:`MODE_PATH<class_CSGPolygon3D_constant_MODE_PATH>`, las extrusiones que son menores que este ángulo se fusionarán para reducir el número de polígonos.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_CSGPolygon3D_property_path_u_distance:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`float<class_float>` **path_u_distance** :ref:`🔗<class_CSGPolygon3D_property_path_u_distance>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_path_u_distance**\ (\ value\: :ref:`float<class_float>`\ )
|
|
- :ref:`float<class_float>` **get_path_u_distance**\ (\ )
|
|
|
|
Cuando :ref:`mode<class_CSGPolygon3D_property_mode>` es :ref:`MODE_PATH<class_CSGPolygon3D_constant_MODE_PATH>`, esta es la distancia a lo largo de la ruta, en metros, que se enlazarán las coordenadas de textura. Cuando se establece en 0, las coordenadas de textura coincidirán exactamente con la geometría sin enlazar.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_CSGPolygon3D_property_polygon:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`PackedVector2Array<class_PackedVector2Array>` **polygon** = ``PackedVector2Array(0, 0, 0, 1, 1, 1, 1, 0)`` :ref:`🔗<class_CSGPolygon3D_property_polygon>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_polygon**\ (\ value\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ )
|
|
- :ref:`PackedVector2Array<class_PackedVector2Array>` **get_polygon**\ (\ )
|
|
|
|
La matriz de puntos que define el polígono 2D que se extruye. Esto puede ser un polígono convexo o cóncavo con 3 o más puntos. El polígono *no* debe tener aristas que se intersecten. De lo contrario, la triangulación fallará y no se generará ninguna malla.
|
|
|
|
\ **Nota:** Si solo se definen 1 o 2 puntos en :ref:`polygon<class_CSGPolygon3D_property_polygon>`, no se generará ninguna malla.
|
|
|
|
**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector2Array<class_PackedVector2Array>` for more details.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_CSGPolygon3D_property_smooth_faces:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`bool<class_bool>` **smooth_faces** = ``false`` :ref:`🔗<class_CSGPolygon3D_property_smooth_faces>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_smooth_faces**\ (\ value\: :ref:`bool<class_bool>`\ )
|
|
- :ref:`bool<class_bool>` **get_smooth_faces**\ (\ )
|
|
|
|
Si es ``true``, aplica sombreado suave a las extrusiones.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_CSGPolygon3D_property_spin_degrees:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`float<class_float>` **spin_degrees** :ref:`🔗<class_CSGPolygon3D_property_spin_degrees>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_spin_degrees**\ (\ value\: :ref:`float<class_float>`\ )
|
|
- :ref:`float<class_float>` **get_spin_degrees**\ (\ )
|
|
|
|
Cuando :ref:`mode<class_CSGPolygon3D_property_mode>` es :ref:`MODE_SPIN<class_CSGPolygon3D_constant_MODE_SPIN>`, el número total de grados que se rota el :ref:`polygon<class_CSGPolygon3D_property_polygon>` al extruir.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_CSGPolygon3D_property_spin_sides:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`int<class_int>` **spin_sides** :ref:`🔗<class_CSGPolygon3D_property_spin_sides>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_spin_sides**\ (\ value\: :ref:`int<class_int>`\ )
|
|
- :ref:`int<class_int>` **get_spin_sides**\ (\ )
|
|
|
|
Cuando :ref:`mode<class_CSGPolygon3D_property_mode>` es :ref:`MODE_SPIN<class_CSGPolygon3D_constant_MODE_SPIN>`, el número de extrusiones realizadas.
|
|
|
|
.. |virtual| replace:: :abbr:`virtual (Normalmente, este método debería ser sobreescrito por el usuario para que tenga algún efecto.)`
|
|
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
|
.. |const| replace:: :abbr:`const (Este método no tiene efectos secundarios. No modifica ninguna de las variables miembro de la instancia.)`
|
|
.. |vararg| replace:: :abbr:`vararg (Este método permite agregar cualquier número de argumentos después de los descritos aquí.)`
|
|
.. |constructor| replace:: :abbr:`constructor (Este método se utiliza para construir un tipo.)`
|
|
.. |static| replace:: :abbr:`static (Este método no necesita una instancia para ser llamado, por lo que puede llamarse directamente utilizando el nombre de la clase.)`
|
|
.. |operator| replace:: :abbr:`operator (Este método describe un operador válido para usar con este tipo como operando izquierdo.)`
|
|
.. |bitfield| replace:: :abbr:`BitField (Este valor es un entero compuesto como una máscara de bits de las siguientes banderas.)`
|
|
.. |void| replace:: :abbr:`void (Sin valor de retorno.)`
|