mirror of
https://github.com/godotengine/godot-docs-l10n.git
synced 2025-12-31 09:49:22 +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
|
||
|
||
描述
|
||
----
|
||
|
||
该资源通过定义一组点和每个点的切线来描述数学曲线。默认情况下,X 轴和 Y 轴的范围都在 ``0`` 到 ``1`` 之间,但是范围可以调整。
|
||
|
||
请注意,许多资源和节点会假设用户设置的是\ *单位曲线*\ 。单位曲线即域(X 轴)在 ``0`` 到 ``1`` 之间的曲线。例如 :ref:`CPUParticles2D.angle_curve<class_CPUParticles2D_property_angle_curve>` 和 :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>`
|
||
|
||
更改 :ref:`max_domain<class_Curve_property_max_domain>` 或 :ref:`min_domain<class_Curve_property_min_domain>` 时发出。
|
||
|
||
.. 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**\ (\ )
|
||
|
||
点能够达到的最大域(X 坐标)。
|
||
|
||
.. 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**\ (\ )
|
||
|
||
点能够达到的最大值(Y 坐标)。切线可能导致两点之间存在更大的值。
|
||
|
||
.. 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**\ (\ )
|
||
|
||
点能够达到的最小域(X 坐标)。
|
||
|
||
.. 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**\ (\ )
|
||
|
||
点能够达到的最小值(Y 坐标)。切线可能导致两点之间存在更小的值。
|
||
|
||
.. 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>`
|
||
|
||
返回 :ref:`min_domain<class_Curve_property_min_domain>` 和 :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>`
|
||
|
||
返回 :ref:`min_value<class_Curve_property_min_value>` 和 :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 (无返回值。)`
|