mirror of
https://github.com/godotengine/godot-docs.git
synced 2025-12-31 17:49:03 +03:00
487 lines
24 KiB
ReStructuredText
487 lines
24 KiB
ReStructuredText
:github_url: hide
|
|
|
|
.. DO NOT EDIT THIS FILE!!!
|
|
.. Generated automatically from Godot engine sources.
|
|
.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
|
|
.. XML source: https://github.com/godotengine/godot/tree/master/modules/csg/doc_classes/CSGPolygon3D.xml.
|
|
|
|
.. _class_CSGPolygon3D:
|
|
|
|
CSGPolygon3D
|
|
============
|
|
|
|
**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>`
|
|
|
|
Extrudes a 2D polygon shape to create a 3D mesh.
|
|
|
|
.. rst-class:: classref-introduction-group
|
|
|
|
Description
|
|
-----------
|
|
|
|
An array of 2D points is extruded to quickly and easily create a variety of 3D meshes. See also :ref:`CSGMesh3D<class_CSGMesh3D>` for using 3D meshes as CSG nodes.
|
|
|
|
\ **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.
|
|
|
|
.. 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:`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
|
|
|
|
Enumerations
|
|
------------
|
|
|
|
.. _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``
|
|
|
|
The :ref:`polygon<class_CSGPolygon3D_property_polygon>` shape is extruded along the negative Z axis.
|
|
|
|
.. _class_CSGPolygon3D_constant_MODE_SPIN:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`Mode<enum_CSGPolygon3D_Mode>` **MODE_SPIN** = ``1``
|
|
|
|
The :ref:`polygon<class_CSGPolygon3D_property_polygon>` shape is extruded by rotating it around the Y axis.
|
|
|
|
.. _class_CSGPolygon3D_constant_MODE_PATH:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`Mode<enum_CSGPolygon3D_Mode>` **MODE_PATH** = ``2``
|
|
|
|
The :ref:`polygon<class_CSGPolygon3D_property_polygon>` shape is extruded along the :ref:`Path3D<class_Path3D>` specified in :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``
|
|
|
|
The :ref:`polygon<class_CSGPolygon3D_property_polygon>` shape is not rotated.
|
|
|
|
\ **Note:** Requires the path Z coordinates to continually decrease to ensure viable shapes.
|
|
|
|
.. _class_CSGPolygon3D_constant_PATH_ROTATION_PATH:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`PathRotation<enum_CSGPolygon3D_PathRotation>` **PATH_ROTATION_PATH** = ``1``
|
|
|
|
The :ref:`polygon<class_CSGPolygon3D_property_polygon>` shape is rotated along the path, but it is not rotated around the path axis.
|
|
|
|
\ **Note:** Requires the path Z coordinates to continually decrease to ensure viable shapes.
|
|
|
|
.. _class_CSGPolygon3D_constant_PATH_ROTATION_PATH_FOLLOW:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`PathRotation<enum_CSGPolygon3D_PathRotation>` **PATH_ROTATION_PATH_FOLLOW** = ``2``
|
|
|
|
The :ref:`polygon<class_CSGPolygon3D_property_polygon>` shape follows the path and its rotations around the path axis.
|
|
|
|
.. 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``
|
|
|
|
When :ref:`mode<class_CSGPolygon3D_property_mode>` is set to :ref:`MODE_PATH<class_CSGPolygon3D_constant_MODE_PATH>`, :ref:`path_interval<class_CSGPolygon3D_property_path_interval>` will determine the distance, in meters, each interval of the path will extrude.
|
|
|
|
.. _class_CSGPolygon3D_constant_PATH_INTERVAL_SUBDIVIDE:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`PathIntervalType<enum_CSGPolygon3D_PathIntervalType>` **PATH_INTERVAL_SUBDIVIDE** = ``1``
|
|
|
|
When :ref:`mode<class_CSGPolygon3D_property_mode>` is set to :ref:`MODE_PATH<class_CSGPolygon3D_constant_MODE_PATH>`, :ref:`path_interval<class_CSGPolygon3D_property_path_interval>` will subdivide the polygons along the path.
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
Property Descriptions
|
|
---------------------
|
|
|
|
.. _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**\ (\ )
|
|
|
|
When :ref:`mode<class_CSGPolygon3D_property_mode>` is :ref:`MODE_DEPTH<class_CSGPolygon3D_constant_MODE_DEPTH>`, the depth of the extrusion.
|
|
|
|
.. 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 to use for the resulting mesh. The UV maps the top half of the material to the extruded shape (U along the length of the extrusions and V around the outline of the :ref:`polygon<class_CSGPolygon3D_property_polygon>`), the bottom-left quarter to the front end face, and the bottom-right quarter to the back end face.
|
|
|
|
.. 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**\ (\ )
|
|
|
|
The :ref:`mode<class_CSGPolygon3D_property_mode>` used to extrude the :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**\ (\ )
|
|
|
|
When :ref:`mode<class_CSGPolygon3D_property_mode>` is :ref:`MODE_PATH<class_CSGPolygon3D_constant_MODE_PATH>`, by default, the top half of the :ref:`material<class_CSGPolygon3D_property_material>` is stretched along the entire length of the extruded shape. If ``false`` the top half of the material is repeated every step of the extrusion.
|
|
|
|
.. 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**\ (\ )
|
|
|
|
When :ref:`mode<class_CSGPolygon3D_property_mode>` is :ref:`MODE_PATH<class_CSGPolygon3D_constant_MODE_PATH>`, the path interval or ratio of path points to extrusions.
|
|
|
|
.. 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**\ (\ )
|
|
|
|
When :ref:`mode<class_CSGPolygon3D_property_mode>` is :ref:`MODE_PATH<class_CSGPolygon3D_constant_MODE_PATH>`, this will determine if the interval should be by distance (:ref:`PATH_INTERVAL_DISTANCE<class_CSGPolygon3D_constant_PATH_INTERVAL_DISTANCE>`) or subdivision fractions (: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**\ (\ )
|
|
|
|
When :ref:`mode<class_CSGPolygon3D_property_mode>` is :ref:`MODE_PATH<class_CSGPolygon3D_constant_MODE_PATH>`, if ``true`` the ends of the path are joined, by adding an extrusion between the last and first points of the path.
|
|
|
|
.. 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**\ (\ )
|
|
|
|
When :ref:`mode<class_CSGPolygon3D_property_mode>` is :ref:`MODE_PATH<class_CSGPolygon3D_constant_MODE_PATH>`, if ``true`` the :ref:`Transform3D<class_Transform3D>` of the **CSGPolygon3D** is used as the starting point for the extrusions, not the :ref:`Transform3D<class_Transform3D>` of the :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**\ (\ )
|
|
|
|
When :ref:`mode<class_CSGPolygon3D_property_mode>` is :ref:`MODE_PATH<class_CSGPolygon3D_constant_MODE_PATH>`, the location of the :ref:`Path3D<class_Path3D>` object used to extrude the :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**\ (\ )
|
|
|
|
When :ref:`mode<class_CSGPolygon3D_property_mode>` is :ref:`MODE_PATH<class_CSGPolygon3D_constant_MODE_PATH>`, the path rotation method used to rotate the :ref:`polygon<class_CSGPolygon3D_property_polygon>` as it is extruded.
|
|
|
|
.. 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**\ (\ )
|
|
|
|
When :ref:`mode<class_CSGPolygon3D_property_mode>` is :ref:`MODE_PATH<class_CSGPolygon3D_constant_MODE_PATH>`, if ``true`` the polygon will be rotated according to the proper tangent of the path at the sampled points. If ``false`` an approximation is used, which decreases in accuracy as the number of subdivisions decreases.
|
|
|
|
.. 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**\ (\ )
|
|
|
|
When :ref:`mode<class_CSGPolygon3D_property_mode>` is :ref:`MODE_PATH<class_CSGPolygon3D_constant_MODE_PATH>`, extrusions that are less than this angle, will be merged together to reduce polygon count.
|
|
|
|
.. 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**\ (\ )
|
|
|
|
When :ref:`mode<class_CSGPolygon3D_property_mode>` is :ref:`MODE_PATH<class_CSGPolygon3D_constant_MODE_PATH>`, this is the distance along the path, in meters, the texture coordinates will tile. When set to 0, texture coordinates will match geometry exactly with no tiling.
|
|
|
|
.. 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**\ (\ )
|
|
|
|
The point array that defines the 2D polygon that is extruded. This can be a convex or concave polygon with 3 or more points. The polygon must *not* have any intersecting edges. Otherwise, triangulation will fail and no mesh will be generated.
|
|
|
|
\ **Note:** If only 1 or 2 points are defined in :ref:`polygon<class_CSGPolygon3D_property_polygon>`, no mesh will be generated.
|
|
|
|
**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**\ (\ )
|
|
|
|
If ``true``, applies smooth shading to the extrusions.
|
|
|
|
.. 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**\ (\ )
|
|
|
|
When :ref:`mode<class_CSGPolygon3D_property_mode>` is :ref:`MODE_SPIN<class_CSGPolygon3D_constant_MODE_SPIN>`, the total number of degrees the :ref:`polygon<class_CSGPolygon3D_property_polygon>` is rotated when extruding.
|
|
|
|
.. 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**\ (\ )
|
|
|
|
When :ref:`mode<class_CSGPolygon3D_property_mode>` is :ref:`MODE_SPIN<class_CSGPolygon3D_constant_MODE_SPIN>`, the number of extrusions made.
|
|
|
|
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
|
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
|
.. |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.)`
|
|
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
|
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
|
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
|
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
|
.. |void| replace:: :abbr:`void (No return value.)`
|