mirror of
https://github.com/godotengine/godot-docs-l10n.git
synced 2026-01-04 10:09:56 +03:00
522 lines
29 KiB
ReStructuredText
522 lines
29 KiB
ReStructuredText
:github_url: hide
|
|
|
|
.. _class_Curve:
|
|
|
|
Curve
|
|
=====
|
|
|
|
**繼承:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
|
|
|
數學曲線。
|
|
|
|
.. rst-class:: classref-introduction-group
|
|
|
|
說明
|
|
----
|
|
|
|
This resource describes a mathematical curve by defining a set of points and tangents at each point. By default, it ranges between ``0`` and ``1`` on the X and Y axes, but these ranges can be changed.
|
|
|
|
Please note that many resources and nodes assume they are given *unit curves*. A unit curve is a curve whose domain (the X axis) is between ``0`` and ``1``. Some examples of unit curve usage are :ref:`CPUParticles2D.angle_curve<class_CPUParticles2D_property_angle_curve>` and :ref:`Line2D.width_curve<class_Line2D_property_width_curve>`.
|
|
|
|
.. rst-class:: classref-reftable-group
|
|
|
|
屬性
|
|
----
|
|
|
|
.. table::
|
|
:widths: auto
|
|
|
|
+---------------------------+--------------------------------------------------------------+---------+
|
|
| :ref:`int<class_int>` | :ref:`bake_resolution<class_Curve_property_bake_resolution>` | ``100`` |
|
|
+---------------------------+--------------------------------------------------------------+---------+
|
|
| :ref:`float<class_float>` | :ref:`max_domain<class_Curve_property_max_domain>` | ``1.0`` |
|
|
+---------------------------+--------------------------------------------------------------+---------+
|
|
| :ref:`float<class_float>` | :ref:`max_value<class_Curve_property_max_value>` | ``1.0`` |
|
|
+---------------------------+--------------------------------------------------------------+---------+
|
|
| :ref:`float<class_float>` | :ref:`min_domain<class_Curve_property_min_domain>` | ``0.0`` |
|
|
+---------------------------+--------------------------------------------------------------+---------+
|
|
| :ref:`float<class_float>` | :ref:`min_value<class_Curve_property_min_value>` | ``0.0`` |
|
|
+---------------------------+--------------------------------------------------------------+---------+
|
|
| :ref:`int<class_int>` | :ref:`point_count<class_Curve_property_point_count>` | ``0`` |
|
|
+---------------------------+--------------------------------------------------------------+---------+
|
|
|
|
.. rst-class:: classref-reftable-group
|
|
|
|
方法
|
|
----
|
|
|
|
.. table::
|
|
:widths: auto
|
|
|
|
+--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`add_point<class_Curve_method_add_point>`\ (\ position\: :ref:`Vector2<class_Vector2>`, left_tangent\: :ref:`float<class_float>` = 0, right_tangent\: :ref:`float<class_float>` = 0, left_mode\: :ref:`TangentMode<enum_Curve_TangentMode>` = 0, right_mode\: :ref:`TangentMode<enum_Curve_TangentMode>` = 0\ ) |
|
|
+--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`bake<class_Curve_method_bake>`\ (\ ) |
|
|
+--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`clean_dupes<class_Curve_method_clean_dupes>`\ (\ ) |
|
|
+--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`clear_points<class_Curve_method_clear_points>`\ (\ ) |
|
|
+--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`float<class_float>` | :ref:`get_domain_range<class_Curve_method_get_domain_range>`\ (\ ) |const| |
|
|
+--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`TangentMode<enum_Curve_TangentMode>` | :ref:`get_point_left_mode<class_Curve_method_get_point_left_mode>`\ (\ index\: :ref:`int<class_int>`\ ) |const| |
|
|
+--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`float<class_float>` | :ref:`get_point_left_tangent<class_Curve_method_get_point_left_tangent>`\ (\ index\: :ref:`int<class_int>`\ ) |const| |
|
|
+--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Vector2<class_Vector2>` | :ref:`get_point_position<class_Curve_method_get_point_position>`\ (\ index\: :ref:`int<class_int>`\ ) |const| |
|
|
+--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`TangentMode<enum_Curve_TangentMode>` | :ref:`get_point_right_mode<class_Curve_method_get_point_right_mode>`\ (\ index\: :ref:`int<class_int>`\ ) |const| |
|
|
+--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`float<class_float>` | :ref:`get_point_right_tangent<class_Curve_method_get_point_right_tangent>`\ (\ index\: :ref:`int<class_int>`\ ) |const| |
|
|
+--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`float<class_float>` | :ref:`get_value_range<class_Curve_method_get_value_range>`\ (\ ) |const| |
|
|
+--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`remove_point<class_Curve_method_remove_point>`\ (\ index\: :ref:`int<class_int>`\ ) |
|
|
+--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`float<class_float>` | :ref:`sample<class_Curve_method_sample>`\ (\ offset\: :ref:`float<class_float>`\ ) |const| |
|
|
+--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`float<class_float>` | :ref:`sample_baked<class_Curve_method_sample_baked>`\ (\ offset\: :ref:`float<class_float>`\ ) |const| |
|
|
+--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`set_point_left_mode<class_Curve_method_set_point_left_mode>`\ (\ index\: :ref:`int<class_int>`, mode\: :ref:`TangentMode<enum_Curve_TangentMode>`\ ) |
|
|
+--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`set_point_left_tangent<class_Curve_method_set_point_left_tangent>`\ (\ index\: :ref:`int<class_int>`, tangent\: :ref:`float<class_float>`\ ) |
|
|
+--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`set_point_offset<class_Curve_method_set_point_offset>`\ (\ index\: :ref:`int<class_int>`, offset\: :ref:`float<class_float>`\ ) |
|
|
+--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`set_point_right_mode<class_Curve_method_set_point_right_mode>`\ (\ index\: :ref:`int<class_int>`, mode\: :ref:`TangentMode<enum_Curve_TangentMode>`\ ) |
|
|
+--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`set_point_right_tangent<class_Curve_method_set_point_right_tangent>`\ (\ index\: :ref:`int<class_int>`, tangent\: :ref:`float<class_float>`\ ) |
|
|
+--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`set_point_value<class_Curve_method_set_point_value>`\ (\ index\: :ref:`int<class_int>`, y\: :ref:`float<class_float>`\ ) |
|
|
+--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
訊號
|
|
----
|
|
|
|
.. _class_Curve_signal_domain_changed:
|
|
|
|
.. rst-class:: classref-signal
|
|
|
|
**domain_changed**\ (\ ) :ref:`🔗<class_Curve_signal_domain_changed>`
|
|
|
|
Emitted when :ref:`max_domain<class_Curve_property_max_domain>` or :ref:`min_domain<class_Curve_property_min_domain>` is changed.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_Curve_signal_range_changed:
|
|
|
|
.. rst-class:: classref-signal
|
|
|
|
**range_changed**\ (\ ) :ref:`🔗<class_Curve_signal_range_changed>`
|
|
|
|
更改 :ref:`max_value<class_Curve_property_max_value>` 或 :ref:`min_value<class_Curve_property_min_value>` 時發出。
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
列舉
|
|
----
|
|
|
|
.. _enum_Curve_TangentMode:
|
|
|
|
.. rst-class:: classref-enumeration
|
|
|
|
enum **TangentMode**: :ref:`🔗<enum_Curve_TangentMode>`
|
|
|
|
.. _class_Curve_constant_TANGENT_FREE:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`TangentMode<enum_Curve_TangentMode>` **TANGENT_FREE** = ``0``
|
|
|
|
點這邊的切線是使用者自訂的。
|
|
|
|
.. _class_Curve_constant_TANGENT_LINEAR:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`TangentMode<enum_Curve_TangentMode>` **TANGENT_LINEAR** = ``1``
|
|
|
|
曲線計算點的這一側的切線,作為向相鄰點的一半的斜率。
|
|
|
|
.. _class_Curve_constant_TANGENT_MODE_COUNT:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`TangentMode<enum_Curve_TangentMode>` **TANGENT_MODE_COUNT** = ``2``
|
|
|
|
可用切線模式的總數。
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
屬性說明
|
|
--------
|
|
|
|
.. _class_Curve_property_bake_resolution:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`int<class_int>` **bake_resolution** = ``100`` :ref:`🔗<class_Curve_property_bake_resolution>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_bake_resolution**\ (\ value\: :ref:`int<class_int>`\ )
|
|
- :ref:`int<class_int>` **get_bake_resolution**\ (\ )
|
|
|
|
烘焙(即快取)曲線資料中包含的點的數量。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_Curve_property_max_domain:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`float<class_float>` **max_domain** = ``1.0`` :ref:`🔗<class_Curve_property_max_domain>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_max_domain**\ (\ value\: :ref:`float<class_float>`\ )
|
|
- :ref:`float<class_float>` **get_max_domain**\ (\ )
|
|
|
|
The maximum domain (x-coordinate) that points can have.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_Curve_property_max_value:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`float<class_float>` **max_value** = ``1.0`` :ref:`🔗<class_Curve_property_max_value>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_max_value**\ (\ value\: :ref:`float<class_float>`\ )
|
|
- :ref:`float<class_float>` **get_max_value**\ (\ )
|
|
|
|
The maximum value (y-coordinate) that points can have. Tangents can cause higher values between points.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_Curve_property_min_domain:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`float<class_float>` **min_domain** = ``0.0`` :ref:`🔗<class_Curve_property_min_domain>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_min_domain**\ (\ value\: :ref:`float<class_float>`\ )
|
|
- :ref:`float<class_float>` **get_min_domain**\ (\ )
|
|
|
|
The minimum domain (x-coordinate) that points can have.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_Curve_property_min_value:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`float<class_float>` **min_value** = ``0.0`` :ref:`🔗<class_Curve_property_min_value>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_min_value**\ (\ value\: :ref:`float<class_float>`\ )
|
|
- :ref:`float<class_float>` **get_min_value**\ (\ )
|
|
|
|
The minimum value (y-coordinate) that points can have. Tangents can cause lower values between points.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_Curve_property_point_count:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`int<class_int>` **point_count** = ``0`` :ref:`🔗<class_Curve_property_point_count>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_point_count**\ (\ value\: :ref:`int<class_int>`\ )
|
|
- :ref:`int<class_int>` **get_point_count**\ (\ )
|
|
|
|
描述該曲線的點的數量。
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
方法說明
|
|
--------
|
|
|
|
.. _class_Curve_method_add_point:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`int<class_int>` **add_point**\ (\ position\: :ref:`Vector2<class_Vector2>`, left_tangent\: :ref:`float<class_float>` = 0, right_tangent\: :ref:`float<class_float>` = 0, left_mode\: :ref:`TangentMode<enum_Curve_TangentMode>` = 0, right_mode\: :ref:`TangentMode<enum_Curve_TangentMode>` = 0\ ) :ref:`🔗<class_Curve_method_add_point>`
|
|
|
|
在曲線上新增一個點。對於每一側,如果 ``*_mode`` 為 :ref:`TANGENT_LINEAR<class_Curve_constant_TANGENT_LINEAR>`\ ,則 ``*_tangent`` 角度(以度為單位)將使用曲線到鄰近點的一半的斜率。如果 ``*_mode`` 設定為 :ref:`TANGENT_FREE<class_Curve_constant_TANGENT_FREE>`\ ,則允許自訂分配給 ``*_tangent`` 的角度。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_Curve_method_bake:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **bake**\ (\ ) :ref:`🔗<class_Curve_method_bake>`
|
|
|
|
重新計算曲線的烘焙點快取。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_Curve_method_clean_dupes:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **clean_dupes**\ (\ ) :ref:`🔗<class_Curve_method_clean_dupes>`
|
|
|
|
移除重複點,即與曲線上相鄰點的距離小於 0.00001 個單位(引擎中的 epsilon 值)的點。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_Curve_method_clear_points:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **clear_points**\ (\ ) :ref:`🔗<class_Curve_method_clear_points>`
|
|
|
|
從曲線中移除所有點。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_Curve_method_get_domain_range:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`float<class_float>` **get_domain_range**\ (\ ) |const| :ref:`🔗<class_Curve_method_get_domain_range>`
|
|
|
|
Returns the difference between :ref:`min_domain<class_Curve_property_min_domain>` and :ref:`max_domain<class_Curve_property_max_domain>`.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_Curve_method_get_point_left_mode:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`TangentMode<enum_Curve_TangentMode>` **get_point_left_mode**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Curve_method_get_point_left_mode>`
|
|
|
|
返回索引為 ``index`` 的點的左側切線模式 :ref:`TangentMode<enum_Curve_TangentMode>`\ 。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_Curve_method_get_point_left_tangent:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`float<class_float>` **get_point_left_tangent**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Curve_method_get_point_left_tangent>`
|
|
|
|
返回索引為 ``index`` 的點的左側切線夾角(單位為度)。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_Curve_method_get_point_position:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`Vector2<class_Vector2>` **get_point_position**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Curve_method_get_point_position>`
|
|
|
|
返回索引為 ``index`` 的點的曲線座標。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_Curve_method_get_point_right_mode:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`TangentMode<enum_Curve_TangentMode>` **get_point_right_mode**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Curve_method_get_point_right_mode>`
|
|
|
|
返回索引為 ``index`` 的點的右側切線模式 :ref:`TangentMode<enum_Curve_TangentMode>`\ 。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_Curve_method_get_point_right_tangent:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`float<class_float>` **get_point_right_tangent**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Curve_method_get_point_right_tangent>`
|
|
|
|
返回索引為 ``index`` 的點的右側切線夾角(單位為度)。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_Curve_method_get_value_range:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`float<class_float>` **get_value_range**\ (\ ) |const| :ref:`🔗<class_Curve_method_get_value_range>`
|
|
|
|
Returns the difference between :ref:`min_value<class_Curve_property_min_value>` and :ref:`max_value<class_Curve_property_max_value>`.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_Curve_method_remove_point:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **remove_point**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Curve_method_remove_point>`
|
|
|
|
移除曲線中索引為 ``index`` 的點。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_Curve_method_sample:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`float<class_float>` **sample**\ (\ offset\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_Curve_method_sample>`
|
|
|
|
返回沿曲線的 X 位置 ``offset`` 處將存在的點的 Y 值。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_Curve_method_sample_baked:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`float<class_float>` **sample_baked**\ (\ offset\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_Curve_method_sample_baked>`
|
|
|
|
使用烘焙的快取返回沿曲線的 X 位置 ``offset`` 處將存在的點的 Y 值。烘焙尚未烘焙的曲線的點。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_Curve_method_set_point_left_mode:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **set_point_left_mode**\ (\ index\: :ref:`int<class_int>`, mode\: :ref:`TangentMode<enum_Curve_TangentMode>`\ ) :ref:`🔗<class_Curve_method_set_point_left_mode>`
|
|
|
|
將索引為 ``index`` 的點的左側 :ref:`TangentMode<enum_Curve_TangentMode>` 設定為 ``mode``\ 。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_Curve_method_set_point_left_tangent:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **set_point_left_tangent**\ (\ index\: :ref:`int<class_int>`, tangent\: :ref:`float<class_float>`\ ) :ref:`🔗<class_Curve_method_set_point_left_tangent>`
|
|
|
|
將索引為 ``index`` 的點的左側切線角度設定為 ``tangent``\ 。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_Curve_method_set_point_offset:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`int<class_int>` **set_point_offset**\ (\ index\: :ref:`int<class_int>`, offset\: :ref:`float<class_float>`\ ) :ref:`🔗<class_Curve_method_set_point_offset>`
|
|
|
|
設定相對於 ``0.5`` 的偏移量。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_Curve_method_set_point_right_mode:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **set_point_right_mode**\ (\ index\: :ref:`int<class_int>`, mode\: :ref:`TangentMode<enum_Curve_TangentMode>`\ ) :ref:`🔗<class_Curve_method_set_point_right_mode>`
|
|
|
|
將索引為 ``index`` 的點的右側 :ref:`TangentMode<enum_Curve_TangentMode>` 設定為 ``mode``\ 。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_Curve_method_set_point_right_tangent:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **set_point_right_tangent**\ (\ index\: :ref:`int<class_int>`, tangent\: :ref:`float<class_float>`\ ) :ref:`🔗<class_Curve_method_set_point_right_tangent>`
|
|
|
|
將索引為 ``index`` 的點的右側切線角度設定為 ``tangent``\ 。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_Curve_method_set_point_value:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **set_point_value**\ (\ index\: :ref:`int<class_int>`, y\: :ref:`float<class_float>`\ ) :ref:`🔗<class_Curve_method_set_point_value>`
|
|
|
|
將索引為 ``index`` 的點的垂直位置設定為 ``y``\ 。
|
|
|
|
.. |virtual| replace:: :abbr:`virtual (本方法通常需要使用者覆寫才能生效。)`
|
|
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
|
.. |const| replace:: :abbr:`const (本方法沒有副作用。不會修改該實例的任何成員變數。)`
|
|
.. |vararg| replace:: :abbr:`vararg (本方法除了這裡描述的參數外,還可以接受任意數量的參數。)`
|
|
.. |constructor| replace:: :abbr:`constructor (本方法用於建構一個型別。)`
|
|
.. |static| replace:: :abbr:`static (本方法無需實例即可呼叫,因此可以直接使用類別名稱呼叫。)`
|
|
.. |operator| replace:: :abbr:`operator (本方法描述將本型別作為左運算元時可用的有效運算子。)`
|
|
.. |bitfield| replace:: :abbr:`BitField (此值是由下列旗標組成的位元遮罩整數。)`
|
|
.. |void| replace:: :abbr:`void (無回傳值。)`
|