diff --git a/classes/class_@globalscope.rst b/classes/class_@globalscope.rst index a115ebeb22d..e25b749540b 100644 --- a/classes/class_@globalscope.rst +++ b/classes/class_@globalscope.rst @@ -130,247 +130,257 @@ Methods .. table:: :widths: auto - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`abs`\ (\ x\: :ref:`Variant`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`absf`\ (\ x\: :ref:`float`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`absi`\ (\ x\: :ref:`int`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`acos`\ (\ x\: :ref:`float`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`acosh`\ (\ x\: :ref:`float`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`angle_difference`\ (\ from\: :ref:`float`, to\: :ref:`float`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`asin`\ (\ x\: :ref:`float`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`asinh`\ (\ x\: :ref:`float`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`atan`\ (\ x\: :ref:`float`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`atan2`\ (\ y\: :ref:`float`, x\: :ref:`float`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`atanh`\ (\ x\: :ref:`float`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`bezier_derivative`\ (\ start\: :ref:`float`, control_1\: :ref:`float`, control_2\: :ref:`float`, end\: :ref:`float`, t\: :ref:`float`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`bezier_interpolate`\ (\ start\: :ref:`float`, control_1\: :ref:`float`, control_2\: :ref:`float`, end\: :ref:`float`, t\: :ref:`float`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`bytes_to_var`\ (\ bytes\: :ref:`PackedByteArray`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`bytes_to_var_with_objects`\ (\ bytes\: :ref:`PackedByteArray`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`ceil`\ (\ x\: :ref:`Variant`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`ceilf`\ (\ x\: :ref:`float`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`ceili`\ (\ x\: :ref:`float`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`clamp`\ (\ value\: :ref:`Variant`, min\: :ref:`Variant`, max\: :ref:`Variant`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`clampf`\ (\ value\: :ref:`float`, min\: :ref:`float`, max\: :ref:`float`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`clampi`\ (\ value\: :ref:`int`, min\: :ref:`int`, max\: :ref:`int`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`cos`\ (\ angle_rad\: :ref:`float`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`cosh`\ (\ x\: :ref:`float`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`cubic_interpolate`\ (\ from\: :ref:`float`, to\: :ref:`float`, pre\: :ref:`float`, post\: :ref:`float`, weight\: :ref:`float`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`cubic_interpolate_angle`\ (\ from\: :ref:`float`, to\: :ref:`float`, pre\: :ref:`float`, post\: :ref:`float`, weight\: :ref:`float`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`cubic_interpolate_angle_in_time`\ (\ from\: :ref:`float`, to\: :ref:`float`, pre\: :ref:`float`, post\: :ref:`float`, weight\: :ref:`float`, to_t\: :ref:`float`, pre_t\: :ref:`float`, post_t\: :ref:`float`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`cubic_interpolate_in_time`\ (\ from\: :ref:`float`, to\: :ref:`float`, pre\: :ref:`float`, post\: :ref:`float`, weight\: :ref:`float`, to_t\: :ref:`float`, pre_t\: :ref:`float`, post_t\: :ref:`float`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`db_to_linear`\ (\ db\: :ref:`float`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`deg_to_rad`\ (\ deg\: :ref:`float`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`ease`\ (\ x\: :ref:`float`, curve\: :ref:`float`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`error_string`\ (\ error\: :ref:`int`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`exp`\ (\ x\: :ref:`float`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`floor`\ (\ x\: :ref:`Variant`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`floorf`\ (\ x\: :ref:`float`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`floori`\ (\ x\: :ref:`float`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`fmod`\ (\ x\: :ref:`float`, y\: :ref:`float`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`fposmod`\ (\ x\: :ref:`float`, y\: :ref:`float`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`hash`\ (\ variable\: :ref:`Variant`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Object` | :ref:`instance_from_id`\ (\ instance_id\: :ref:`int`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`inverse_lerp`\ (\ from\: :ref:`float`, to\: :ref:`float`, weight\: :ref:`float`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_equal_approx`\ (\ a\: :ref:`float`, b\: :ref:`float`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_finite`\ (\ x\: :ref:`float`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_inf`\ (\ x\: :ref:`float`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_instance_id_valid`\ (\ id\: :ref:`int`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_instance_valid`\ (\ instance\: :ref:`Variant`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_nan`\ (\ x\: :ref:`float`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_same`\ (\ a\: :ref:`Variant`, b\: :ref:`Variant`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_zero_approx`\ (\ x\: :ref:`float`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`lerp`\ (\ from\: :ref:`Variant`, to\: :ref:`Variant`, weight\: :ref:`Variant`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`lerp_angle`\ (\ from\: :ref:`float`, to\: :ref:`float`, weight\: :ref:`float`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`lerpf`\ (\ from\: :ref:`float`, to\: :ref:`float`, weight\: :ref:`float`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`linear_to_db`\ (\ lin\: :ref:`float`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`log`\ (\ x\: :ref:`float`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`max`\ (\ ...\ ) |vararg| | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`maxf`\ (\ a\: :ref:`float`, b\: :ref:`float`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`maxi`\ (\ a\: :ref:`int`, b\: :ref:`int`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`min`\ (\ ...\ ) |vararg| | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`minf`\ (\ a\: :ref:`float`, b\: :ref:`float`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`mini`\ (\ a\: :ref:`int`, b\: :ref:`int`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`move_toward`\ (\ from\: :ref:`float`, to\: :ref:`float`, delta\: :ref:`float`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`nearest_po2`\ (\ value\: :ref:`int`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`pingpong`\ (\ value\: :ref:`float`, length\: :ref:`float`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`posmod`\ (\ x\: :ref:`int`, y\: :ref:`int`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`pow`\ (\ base\: :ref:`float`, exp\: :ref:`float`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`print`\ (\ ...\ ) |vararg| | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`print_rich`\ (\ ...\ ) |vararg| | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`print_verbose`\ (\ ...\ ) |vararg| | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`printerr`\ (\ ...\ ) |vararg| | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`printraw`\ (\ ...\ ) |vararg| | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`prints`\ (\ ...\ ) |vararg| | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`printt`\ (\ ...\ ) |vararg| | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`push_error`\ (\ ...\ ) |vararg| | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`push_warning`\ (\ ...\ ) |vararg| | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`rad_to_deg`\ (\ rad\: :ref:`float`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt64Array` | :ref:`rand_from_seed`\ (\ seed\: :ref:`int`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`randf`\ (\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`randf_range`\ (\ from\: :ref:`float`, to\: :ref:`float`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`randfn`\ (\ mean\: :ref:`float`, deviation\: :ref:`float`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`randi`\ (\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`randi_range`\ (\ from\: :ref:`int`, to\: :ref:`int`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`randomize`\ (\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`remap`\ (\ value\: :ref:`float`, istart\: :ref:`float`, istop\: :ref:`float`, ostart\: :ref:`float`, ostop\: :ref:`float`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`rid_allocate_id`\ (\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`rid_from_int64`\ (\ base\: :ref:`int`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`rotate_toward`\ (\ from\: :ref:`float`, to\: :ref:`float`, delta\: :ref:`float`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`round`\ (\ x\: :ref:`Variant`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`roundf`\ (\ x\: :ref:`float`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`roundi`\ (\ x\: :ref:`float`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`seed`\ (\ base\: :ref:`int`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`sigmoid`\ (\ x\: :ref:`float`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`sigmoid_affine`\ (\ x\: :ref:`float`, amplitude\: :ref:`float`, y_translation\: :ref:`float`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`sigmoid_affine_approx`\ (\ x\: :ref:`float`, amplitude\: :ref:`float`, y_translation\: :ref:`float`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`sigmoid_approx`\ (\ x\: :ref:`float`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`sign`\ (\ x\: :ref:`Variant`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`signf`\ (\ x\: :ref:`float`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`signi`\ (\ x\: :ref:`int`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`sin`\ (\ angle_rad\: :ref:`float`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`sinh`\ (\ x\: :ref:`float`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`smoothstep`\ (\ from\: :ref:`float`, to\: :ref:`float`, x\: :ref:`float`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`snapped`\ (\ x\: :ref:`Variant`, step\: :ref:`Variant`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`snappedf`\ (\ x\: :ref:`float`, step\: :ref:`float`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`snappedi`\ (\ x\: :ref:`float`, step\: :ref:`int`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`sqrt`\ (\ x\: :ref:`float`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`step_decimals`\ (\ x\: :ref:`float`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`str`\ (\ ...\ ) |vararg| | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`str_to_var`\ (\ string\: :ref:`String`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`str_to_var_with_objects`\ (\ string\: :ref:`String`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`tan`\ (\ angle_rad\: :ref:`float`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`tanh`\ (\ x\: :ref:`float`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`type_convert`\ (\ variant\: :ref:`Variant`, type\: :ref:`int`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`type_string`\ (\ type\: :ref:`int`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`typeof`\ (\ variable\: :ref:`Variant`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray` | :ref:`var_to_bytes`\ (\ variable\: :ref:`Variant`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray` | :ref:`var_to_bytes_with_objects`\ (\ variable\: :ref:`Variant`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`var_to_str`\ (\ variable\: :ref:`Variant`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`var_to_str_with_objects`\ (\ variable\: :ref:`Variant`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`weakref`\ (\ obj\: :ref:`Variant`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`wrap`\ (\ value\: :ref:`Variant`, min\: :ref:`Variant`, max\: :ref:`Variant`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`wrapf`\ (\ value\: :ref:`float`, min\: :ref:`float`, max\: :ref:`float`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`wrapi`\ (\ value\: :ref:`int`, min\: :ref:`int`, max\: :ref:`int`\ ) | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`abs`\ (\ x\: :ref:`Variant`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`absf`\ (\ x\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`absi`\ (\ x\: :ref:`int`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`acos`\ (\ x\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`acosh`\ (\ x\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`angle_difference`\ (\ from\: :ref:`float`, to\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`asin`\ (\ x\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`asinh`\ (\ x\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`atan`\ (\ x\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`atan2`\ (\ y\: :ref:`float`, x\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`atanh`\ (\ x\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`bezier_derivative`\ (\ start\: :ref:`float`, control_1\: :ref:`float`, control_2\: :ref:`float`, end\: :ref:`float`, t\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`bezier_interpolate`\ (\ start\: :ref:`float`, control_1\: :ref:`float`, control_2\: :ref:`float`, end\: :ref:`float`, t\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`bytes_to_var`\ (\ bytes\: :ref:`PackedByteArray`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`bytes_to_var_with_objects`\ (\ bytes\: :ref:`PackedByteArray`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`ceil`\ (\ x\: :ref:`Variant`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`ceilf`\ (\ x\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`ceili`\ (\ x\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`clamp`\ (\ value\: :ref:`Variant`, min\: :ref:`Variant`, max\: :ref:`Variant`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`clampf`\ (\ value\: :ref:`float`, min\: :ref:`float`, max\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`clampi`\ (\ value\: :ref:`int`, min\: :ref:`int`, max\: :ref:`int`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`cos`\ (\ angle_rad\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`cosh`\ (\ x\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`cubic_interpolate`\ (\ from\: :ref:`float`, to\: :ref:`float`, pre\: :ref:`float`, post\: :ref:`float`, weight\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`cubic_interpolate_angle`\ (\ from\: :ref:`float`, to\: :ref:`float`, pre\: :ref:`float`, post\: :ref:`float`, weight\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`cubic_interpolate_angle_in_time`\ (\ from\: :ref:`float`, to\: :ref:`float`, pre\: :ref:`float`, post\: :ref:`float`, weight\: :ref:`float`, to_t\: :ref:`float`, pre_t\: :ref:`float`, post_t\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`cubic_interpolate_in_time`\ (\ from\: :ref:`float`, to\: :ref:`float`, pre\: :ref:`float`, post\: :ref:`float`, weight\: :ref:`float`, to_t\: :ref:`float`, pre_t\: :ref:`float`, post_t\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`db_to_linear`\ (\ db\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`deg_to_rad`\ (\ deg\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`ease`\ (\ x\: :ref:`float`, curve\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`error_string`\ (\ error\: :ref:`int`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`exp`\ (\ x\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`floor`\ (\ x\: :ref:`Variant`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`floorf`\ (\ x\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`floori`\ (\ x\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`fmod`\ (\ x\: :ref:`float`, y\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`fposmod`\ (\ x\: :ref:`float`, y\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`hash`\ (\ variable\: :ref:`Variant`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Object` | :ref:`instance_from_id`\ (\ instance_id\: :ref:`int`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`inverse_lerp`\ (\ from\: :ref:`float`, to\: :ref:`float`, weight\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_equal_approx`\ (\ a\: :ref:`float`, b\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_finite`\ (\ x\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_inf`\ (\ x\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_instance_id_valid`\ (\ id\: :ref:`int`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_instance_valid`\ (\ instance\: :ref:`Variant`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_nan`\ (\ x\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_same`\ (\ a\: :ref:`Variant`, b\: :ref:`Variant`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_zero_approx`\ (\ x\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`lerp`\ (\ from\: :ref:`Variant`, to\: :ref:`Variant`, weight\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`lerp_angle`\ (\ from\: :ref:`float`, to\: :ref:`float`, weight\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`lerpf`\ (\ from\: :ref:`float`, to\: :ref:`float`, weight\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`linear_to_db`\ (\ lin\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`log`\ (\ x\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`max`\ (\ ...\ ) |vararg| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`maxf`\ (\ a\: :ref:`float`, b\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`maxi`\ (\ a\: :ref:`int`, b\: :ref:`int`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`min`\ (\ ...\ ) |vararg| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`minf`\ (\ a\: :ref:`float`, b\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`mini`\ (\ a\: :ref:`int`, b\: :ref:`int`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`monotonic_cubic_interpolate`\ (\ from\: :ref:`float`, to\: :ref:`float`, pre\: :ref:`float`, post\: :ref:`float`, weight\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`monotonic_cubic_interpolate_angle`\ (\ from\: :ref:`float`, to\: :ref:`float`, pre\: :ref:`float`, post\: :ref:`float`, weight\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`monotonic_cubic_interpolate_angle_in_time`\ (\ from\: :ref:`float`, to\: :ref:`float`, pre\: :ref:`float`, post\: :ref:`float`, weight\: :ref:`float`, to_t\: :ref:`float`, pre_t\: :ref:`float`, post_t\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`monotonic_cubic_interpolate_in_time`\ (\ from\: :ref:`float`, to\: :ref:`float`, pre\: :ref:`float`, post\: :ref:`float`, weight\: :ref:`float`, to_t\: :ref:`float`, pre_t\: :ref:`float`, post_t\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`move_toward`\ (\ from\: :ref:`float`, to\: :ref:`float`, delta\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`nearest_po2`\ (\ value\: :ref:`int`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`pingpong`\ (\ value\: :ref:`float`, length\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`posmod`\ (\ x\: :ref:`int`, y\: :ref:`int`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`pow`\ (\ base\: :ref:`float`, exp\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`print`\ (\ ...\ ) |vararg| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`print_rich`\ (\ ...\ ) |vararg| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`print_verbose`\ (\ ...\ ) |vararg| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`printerr`\ (\ ...\ ) |vararg| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`printraw`\ (\ ...\ ) |vararg| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`prints`\ (\ ...\ ) |vararg| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`printt`\ (\ ...\ ) |vararg| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`push_error`\ (\ ...\ ) |vararg| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`push_warning`\ (\ ...\ ) |vararg| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`rad_to_deg`\ (\ rad\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt64Array` | :ref:`rand_from_seed`\ (\ seed\: :ref:`int`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`randf`\ (\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`randf_range`\ (\ from\: :ref:`float`, to\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`randfn`\ (\ mean\: :ref:`float`, deviation\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`randi`\ (\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`randi_range`\ (\ from\: :ref:`int`, to\: :ref:`int`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`randomize`\ (\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`remap`\ (\ value\: :ref:`float`, istart\: :ref:`float`, istop\: :ref:`float`, ostart\: :ref:`float`, ostop\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`remap_default`\ (\ value\: :ref:`float`, istart\: :ref:`float`, istop\: :ref:`float`, ostart\: :ref:`float`, ostop\: :ref:`float`, default_value\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rid_allocate_id`\ (\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`rid_from_int64`\ (\ base\: :ref:`int`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`rotate_toward`\ (\ from\: :ref:`float`, to\: :ref:`float`, delta\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`round`\ (\ x\: :ref:`Variant`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`roundf`\ (\ x\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`roundi`\ (\ x\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`seed`\ (\ base\: :ref:`int`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`sigmoid`\ (\ x\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`sigmoid_affine`\ (\ x\: :ref:`float`, amplitude\: :ref:`float`, y_translation\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`sigmoid_affine_approx`\ (\ x\: :ref:`float`, amplitude\: :ref:`float`, y_translation\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`sigmoid_approx`\ (\ x\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`sign`\ (\ x\: :ref:`Variant`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`signf`\ (\ x\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`signi`\ (\ x\: :ref:`int`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`sin`\ (\ angle_rad\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`sinh`\ (\ x\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`smoothstep`\ (\ from\: :ref:`float`, to\: :ref:`float`, x\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`snapped`\ (\ x\: :ref:`Variant`, step\: :ref:`Variant`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`snappedf`\ (\ x\: :ref:`float`, step\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`snappedi`\ (\ x\: :ref:`float`, step\: :ref:`int`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`sqrt`\ (\ x\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`step_decimals`\ (\ x\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`str`\ (\ ...\ ) |vararg| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`str_to_var`\ (\ string\: :ref:`String`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`str_to_var_with_objects`\ (\ string\: :ref:`String`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`tan`\ (\ angle_rad\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`tanh`\ (\ x\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`type_convert`\ (\ variant\: :ref:`Variant`, type\: :ref:`int`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`type_string`\ (\ type\: :ref:`int`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`typeof`\ (\ variable\: :ref:`Variant`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`var_to_bytes`\ (\ variable\: :ref:`Variant`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`var_to_bytes_with_objects`\ (\ variable\: :ref:`Variant`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`var_to_str`\ (\ variable\: :ref:`Variant`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`var_to_str_with_objects`\ (\ variable\: :ref:`Variant`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`weakref`\ (\ obj\: :ref:`Variant`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`wrap`\ (\ value\: :ref:`Variant`, min\: :ref:`Variant`, max\: :ref:`Variant`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`wrapf`\ (\ value\: :ref:`float`, min\: :ref:`float`, max\: :ref:`float`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`wrapi`\ (\ value\: :ref:`int`, min\: :ref:`int`, max\: :ref:`int`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -4609,11 +4619,19 @@ Variable is of type :ref:`PackedColorArray`. Variable is of type :ref:`PackedVector4Array`. +.. _class_@GlobalScope_constant_TYPE_STRUCT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Variant.Type` **TYPE_STRUCT** = ``39`` + +Variable is of type Struct. + .. _class_@GlobalScope_constant_TYPE_MAX: .. rst-class:: classref-enumeration-constant -:ref:`Variant.Type` **TYPE_MAX** = ``39`` +:ref:`Variant.Type` **TYPE_MAX** = ``40`` Represents the size of the :ref:`Variant.Type` enum. @@ -6199,7 +6217,7 @@ This function is faster than using :ref:`is_equal_approx()` **lerp**\ (\ from\: :ref:`Variant`, to\: :ref:`Variant`, weight\: :ref:`Variant`\ ) :ref:`🔗` +:ref:`Variant` **lerp**\ (\ from\: :ref:`Variant`, to\: :ref:`Variant`, weight\: :ref:`float`\ ) :ref:`🔗` Linearly interpolates between two values by the factor defined in ``weight``. To perform interpolation, ``weight`` should be between ``0.0`` and ``1.0`` (inclusive). However, values outside this range are allowed and can be used to perform *extrapolation*. If this is not desired, use :ref:`clampf()` to limit ``weight``. @@ -6403,6 +6421,100 @@ Returns the minimum of two :ref:`int` values. ---- +.. _class_@GlobalScope_method_monotonic_cubic_interpolate: + +.. rst-class:: classref-method + +:ref:`float` **monotonic_cubic_interpolate**\ (\ from\: :ref:`float`, to\: :ref:`float`, pre\: :ref:`float`, post\: :ref:`float`, weight\: :ref:`float`\ ) :ref:`🔗` + +Performs monotonic cubic interpolation between ``from`` and ``to``\ + +using neighboring values ``pre`` and ``post``. + +The interpolation factor ``weight`` is typically between 0.0 and 1.0. + + + +Unlike :ref:`cubic_interpolate()`, this method preserves monotonicity + +by automatically limiting tangents to prevent overshoot between key values. + +This makes it suitable for animation tracks and other data where values + +should not exceed surrounding keyframes. + +.. rst-class:: classref-item-separator + +---- + +.. _class_@GlobalScope_method_monotonic_cubic_interpolate_angle: + +.. rst-class:: classref-method + +:ref:`float` **monotonic_cubic_interpolate_angle**\ (\ from\: :ref:`float`, to\: :ref:`float`, pre\: :ref:`float`, post\: :ref:`float`, weight\: :ref:`float`\ ) :ref:`🔗` + +Performs monotonic cubic interpolation between angular values, rotating + +along the shortest path between ``from`` and ``to``. + + + +The neighboring angles ``pre`` and ``post`` are used to compute + +shape-preserving tangents while accounting for angle wrapping. + +This prevents overshoot while maintaining continuous rotation. + +See also :ref:`lerp_angle()`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_@GlobalScope_method_monotonic_cubic_interpolate_angle_in_time: + +.. rst-class:: classref-method + +:ref:`float` **monotonic_cubic_interpolate_angle_in_time**\ (\ from\: :ref:`float`, to\: :ref:`float`, pre\: :ref:`float`, post\: :ref:`float`, weight\: :ref:`float`, to_t\: :ref:`float`, pre_t\: :ref:`float`, post_t\: :ref:`float`\ ) :ref:`🔗` + +Time-aware version of :ref:`monotonic_cubic_interpolate_angle()`. + + + +The interpolation factor is derived from the provided keyframe times, + +allowing unevenly spaced keyframes to influence tangent calculation. + +This produces consistent motion when animation keys are not uniformly + +distributed in time while still preventing overshoot. + +.. rst-class:: classref-item-separator + +---- + +.. _class_@GlobalScope_method_monotonic_cubic_interpolate_in_time: + +.. rst-class:: classref-method + +:ref:`float` **monotonic_cubic_interpolate_in_time**\ (\ from\: :ref:`float`, to\: :ref:`float`, pre\: :ref:`float`, post\: :ref:`float`, weight\: :ref:`float`, to_t\: :ref:`float`, pre_t\: :ref:`float`, post_t\: :ref:`float`\ ) :ref:`🔗` + +Time-aware version of :ref:`monotonic_cubic_interpolate()`. + + + +The interpolation parameter is normalized using the supplied keyframe + +times, allowing interpolation to account for non-uniform spacing between + +values. Tangents are computed in a way that preserves monotonicity and + +prevents overshoot between keyframes. + +.. rst-class:: classref-item-separator + +---- + .. _class_@GlobalScope_method_move_toward: .. rst-class:: classref-method @@ -6949,7 +7061,26 @@ Maps a ``value`` from range ``[istart, istop]`` to ``[ostart, ostop]``. See also For complex use cases where multiple ranges are needed, consider using :ref:`Curve` or :ref:`Gradient` instead. -\ **Note:** If ``istart == istop``, the return value is undefined (most likely NaN, INF, or -INF). +\ **Note:** If ``istart == istop``, the return value is undefined (most likely NaN, INF, or -INF). See also :ref:`remap_default()`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_@GlobalScope_method_remap_default: + +.. rst-class:: classref-method + +:ref:`float` **remap_default**\ (\ value\: :ref:`float`, istart\: :ref:`float`, istop\: :ref:`float`, ostart\: :ref:`float`, ostop\: :ref:`float`, default_value\: :ref:`float`\ ) :ref:`🔗` + +Maps a ``value`` from range ``[istart, istop]`` to ``[ostart, ostop]`` and returns ``default_value`` if :ref:`remap()` would've returned ``INF`` or ``NAN``. See also :ref:`remap()`, :ref:`lerp()` and :ref:`inverse_lerp()`. If ``value`` is outside ``[istart, istop]``, then the resulting value will also be outside ``[ostart, ostop]``. If this is not desired, use :ref:`clamp()` on the result of this function. + +:: + + remap_default(75, 0, 100, -1, 1, 3) # Returns 0.5 + remap_default(75, 0, 0, -1, 1, 3) # Returns 3.0 + +For complex use cases where multiple ranges are needed, consider using :ref:`Curve` or :ref:`Gradient` instead. .. rst-class:: classref-item-separator diff --git a/classes/class_aimmodifier3d.rst b/classes/class_aimmodifier3d.rst index 7132d64b538..7bcfb280360 100644 --- a/classes/class_aimmodifier3d.rst +++ b/classes/class_aimmodifier3d.rst @@ -48,6 +48,8 @@ Methods +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Axis` | :ref:`get_primary_rotation_axis`\ (\ index\: :ref:`int`\ ) |const| | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_relative`\ (\ index\: :ref:`int`\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_using_euler`\ (\ index\: :ref:`int`\ ) |const| | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_using_secondary_rotation`\ (\ index\: :ref:`int`\ ) |const| | @@ -56,6 +58,8 @@ Methods +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_primary_rotation_axis`\ (\ index\: :ref:`int`, axis\: :ref:`Axis`\ ) | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_relative`\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_use_euler`\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_use_secondary_rotation`\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) | @@ -116,6 +120,18 @@ Returns the axis of the first rotation. It is enabled only if :ref:`is_using_eul ---- +.. _class_AimModifier3D_method_is_relative: + +.. rst-class:: classref-method + +:ref:`bool` **is_relative**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns ``true`` if the relative option is enabled in the setting at ``index``. + +.. rst-class:: classref-item-separator + +---- + .. _class_AimModifier3D_method_is_using_euler: .. rst-class:: classref-method @@ -164,6 +180,22 @@ Sets the axis of the first rotation. It is enabled only if :ref:`is_using_euler( ---- +.. _class_AimModifier3D_method_set_relative: + +.. rst-class:: classref-method + +|void| **set_relative**\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) :ref:`🔗` + +Sets relative option in the setting at ``index`` to ``enabled``. + +If sets ``enabled`` to ``true``, the rotation is applied relative to the pose. + +If sets ``enabled`` to ``false``, the rotation is applied relative to the rest. It means to replace the current pose with the **AimModifier3D**'s result. + +.. rst-class:: classref-item-separator + +---- + .. _class_AimModifier3D_method_set_use_euler: .. rst-class:: classref-method diff --git a/classes/class_animation.rst b/classes/class_animation.rst index dd394d5bd5b..371bbc40ad6 100644 --- a/classes/class_animation.rst +++ b/classes/class_animation.rst @@ -364,6 +364,14 @@ Linear interpolation. Cubic interpolation. This looks smoother than linear interpolation, but is more expensive to interpolate. Stick to :ref:`INTERPOLATION_LINEAR` for complex 3D animations imported from external software, even if it requires using a higher animation framerate in return. +.. _class_Animation_constant_INTERPOLATION_CUBIC_MONOTONIC: + +.. rst-class:: classref-enumeration-constant + +:ref:`InterpolationType` **INTERPOLATION_CUBIC_MONOTONIC** = ``5`` + +Monotonic Cubic interpolation. This is an alternate version of :ref:`INTERPOLATION_CUBIC` that ensures no overshooting of key points. + .. _class_Animation_constant_INTERPOLATION_LINEAR_ANGLE: .. rst-class:: classref-enumeration-constant @@ -384,6 +392,14 @@ Cubic interpolation with shortest path rotation. \ **Note:** The result value is always normalized and may not match the key value. +.. _class_Animation_constant_INTERPOLATION_CUBIC_MONOTONIC_ANGLE: + +.. rst-class:: classref-enumeration-constant + +:ref:`InterpolationType` **INTERPOLATION_CUBIC_MONOTONIC_ANGLE** = ``6`` + +Monotonic Cubic interpolation with shortest path rotation. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_boneconstraint3d.rst b/classes/class_boneconstraint3d.rst index 87824ca67c3..54a089833d5 100644 --- a/classes/class_boneconstraint3d.rst +++ b/classes/class_boneconstraint3d.rst @@ -31,33 +31,74 @@ Methods .. table:: :widths: auto - +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`clear_setting`\ (\ ) | - +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_amount`\ (\ index\: :ref:`int`\ ) |const| | - +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_apply_bone`\ (\ index\: :ref:`int`\ ) |const| | - +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_apply_bone_name`\ (\ index\: :ref:`int`\ ) |const| | - +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_reference_bone`\ (\ index\: :ref:`int`\ ) |const| | - +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_reference_bone_name`\ (\ index\: :ref:`int`\ ) |const| | - +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_setting_count`\ (\ ) |const| | - +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_amount`\ (\ index\: :ref:`int`, amount\: :ref:`float`\ ) | - +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_apply_bone`\ (\ index\: :ref:`int`, bone\: :ref:`int`\ ) | - +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_apply_bone_name`\ (\ index\: :ref:`int`, bone_name\: :ref:`String`\ ) | - +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_reference_bone`\ (\ index\: :ref:`int`, bone\: :ref:`int`\ ) | - +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_reference_bone_name`\ (\ index\: :ref:`int`, bone_name\: :ref:`String`\ ) | - +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_setting_count`\ (\ count\: :ref:`int`\ ) | - +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_setting`\ (\ ) | + +-----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_amount`\ (\ index\: :ref:`int`\ ) |const| | + +-----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_apply_bone`\ (\ index\: :ref:`int`\ ) |const| | + +-----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_apply_bone_name`\ (\ index\: :ref:`int`\ ) |const| | + +-----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_reference_bone`\ (\ index\: :ref:`int`\ ) |const| | + +-----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_reference_bone_name`\ (\ index\: :ref:`int`\ ) |const| | + +-----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`NodePath` | :ref:`get_reference_node`\ (\ index\: :ref:`int`\ ) |const| | + +-----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ReferenceType` | :ref:`get_reference_type`\ (\ index\: :ref:`int`\ ) |const| | + +-----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_setting_count`\ (\ ) |const| | + +-----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_amount`\ (\ index\: :ref:`int`, amount\: :ref:`float`\ ) | + +-----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_apply_bone`\ (\ index\: :ref:`int`, bone\: :ref:`int`\ ) | + +-----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_apply_bone_name`\ (\ index\: :ref:`int`, bone_name\: :ref:`String`\ ) | + +-----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_reference_bone`\ (\ index\: :ref:`int`, bone\: :ref:`int`\ ) | + +-----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_reference_bone_name`\ (\ index\: :ref:`int`, bone_name\: :ref:`String`\ ) | + +-----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_reference_node`\ (\ index\: :ref:`int`, node\: :ref:`NodePath`\ ) | + +-----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_reference_type`\ (\ index\: :ref:`int`, type\: :ref:`ReferenceType`\ ) | + +-----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_setting_count`\ (\ count\: :ref:`int`\ ) | + +-----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Enumerations +------------ + +.. _enum_BoneConstraint3D_ReferenceType: + +.. rst-class:: classref-enumeration + +enum **ReferenceType**: :ref:`🔗` + +.. _class_BoneConstraint3D_constant_REFERENCE_TYPE_BONE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ReferenceType` **REFERENCE_TYPE_BONE** = ``0`` + +The reference target is a bone. In this case, the reference target spaces is local space. + +.. _class_BoneConstraint3D_constant_REFERENCE_TYPE_NODE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ReferenceType` **REFERENCE_TYPE_NODE** = ``1`` + +The reference target is a :ref:`Node3D`. In this case, the reference target spaces is model space. + +In other words, the reference target's coordinates are treated as if it were placed directly under :ref:`Skeleton3D` which parent of the **BoneConstraint3D**. .. rst-class:: classref-section-separator @@ -144,6 +185,32 @@ This bone will be only referenced and not modified by this modifier. ---- +.. _class_BoneConstraint3D_method_get_reference_node: + +.. rst-class:: classref-method + +:ref:`NodePath` **get_reference_node**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the reference node path of the setting at ``index``. + +This node will be only referenced and not modified by this modifier. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BoneConstraint3D_method_get_reference_type: + +.. rst-class:: classref-method + +:ref:`ReferenceType` **get_reference_type**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the reference target type of the setting at ``index``. See also :ref:`ReferenceType`. + +.. rst-class:: classref-item-separator + +---- + .. _class_BoneConstraint3D_method_get_setting_count: .. rst-class:: classref-method @@ -220,6 +287,32 @@ This bone will be only referenced and not modified by this modifier. ---- +.. _class_BoneConstraint3D_method_set_reference_node: + +.. rst-class:: classref-method + +|void| **set_reference_node**\ (\ index\: :ref:`int`, node\: :ref:`NodePath`\ ) :ref:`🔗` + +Sets the reference node path of the setting at ``index`` to ``node``. + +This node will be only referenced and not modified by this modifier. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BoneConstraint3D_method_set_reference_type: + +.. rst-class:: classref-method + +|void| **set_reference_type**\ (\ index\: :ref:`int`, type\: :ref:`ReferenceType`\ ) :ref:`🔗` + +Sets the reference target type of the setting at ``index`` to ``type``. See also :ref:`ReferenceType`. + +.. rst-class:: classref-item-separator + +---- + .. _class_BoneConstraint3D_method_set_setting_count: .. rst-class:: classref-method diff --git a/classes/class_bonetwistdisperser3d.rst b/classes/class_bonetwistdisperser3d.rst new file mode 100644 index 00000000000..a48edba41b5 --- /dev/null +++ b/classes/class_bonetwistdisperser3d.rst @@ -0,0 +1,581 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Redot engine sources. +.. Generator: https://github.com/Redot-Engine/redot-engine/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/Redot-Engine/redot-engine/tree/master/doc/classes/BoneTwistDisperser3D.xml. + +.. _class_BoneTwistDisperser3D: + +BoneTwistDisperser3D +==================== + +**Inherits:** :ref:`SkeletonModifier3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` + +A node that propagates and disperses the child bone's twist to the parent bones. + +.. rst-class:: classref-introduction-group + +Description +----------- + +This **BoneTwistDisperser3D** allows for smooth twist interpolation between multiple bones by dispersing the end bone's twist to the parents. This only changes the twist without changing the global position of each joint. + +This is useful for smoothly twisting bones in combination with :ref:`CopyTransformModifier3D` and IK. + +\ **Note:** If an extracted twist is greater than 180 degrees, flipping occurs. This is similar to :ref:`ConvertTransformModifier3D`. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-------------------------+---------------------------------------------------------------------------------+----------+ + | :ref:`bool` | :ref:`mutable_bone_axes` | ``true`` | + +-------------------------+---------------------------------------------------------------------------------+----------+ + | :ref:`int` | :ref:`setting_count` | ``0`` | + +-------------------------+---------------------------------------------------------------------------------+----------+ + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +-------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_settings`\ (\ ) | + +-------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Curve` | :ref:`get_damping_curve`\ (\ index\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`DisperseMode` | :ref:`get_disperse_mode`\ (\ index\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_end_bone`\ (\ index\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`BoneDirection` | :ref:`get_end_bone_direction`\ (\ index\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_end_bone_name`\ (\ index\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_joint_bone`\ (\ index\: :ref:`int`, joint\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_joint_bone_name`\ (\ index\: :ref:`int`, joint\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_joint_count`\ (\ index\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_joint_twist_amount`\ (\ index\: :ref:`int`, joint\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_reference_bone`\ (\ index\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_reference_bone_name`\ (\ index\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_root_bone`\ (\ index\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_root_bone_name`\ (\ index\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion` | :ref:`get_twist_from`\ (\ index\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_weight_position`\ (\ index\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_end_bone_extended`\ (\ index\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_twist_from_rest`\ (\ index\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_damping_curve`\ (\ index\: :ref:`int`, curve\: :ref:`Curve`\ ) | + +-------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_disperse_mode`\ (\ index\: :ref:`int`, disperse_mode\: :ref:`DisperseMode`\ ) | + +-------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_end_bone`\ (\ index\: :ref:`int`, bone\: :ref:`int`\ ) | + +-------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_end_bone_direction`\ (\ index\: :ref:`int`, bone_direction\: :ref:`BoneDirection`\ ) | + +-------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_end_bone_name`\ (\ index\: :ref:`int`, bone_name\: :ref:`String`\ ) | + +-------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_extend_end_bone`\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) | + +-------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_joint_twist_amount`\ (\ index\: :ref:`int`, joint\: :ref:`int`, twist_amount\: :ref:`float`\ ) | + +-------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_root_bone`\ (\ index\: :ref:`int`, bone\: :ref:`int`\ ) | + +-------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_root_bone_name`\ (\ index\: :ref:`int`, bone_name\: :ref:`String`\ ) | + +-------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_twist_from`\ (\ index\: :ref:`int`, from\: :ref:`Quaternion`\ ) | + +-------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_twist_from_rest`\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) | + +-------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_weight_position`\ (\ index\: :ref:`int`, weight_position\: :ref:`float`\ ) | + +-------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Enumerations +------------ + +.. _enum_BoneTwistDisperser3D_DisperseMode: + +.. rst-class:: classref-enumeration + +enum **DisperseMode**: :ref:`🔗` + +.. _class_BoneTwistDisperser3D_constant_DISPERSE_MODE_EVEN: + +.. rst-class:: classref-enumeration-constant + +:ref:`DisperseMode` **DISPERSE_MODE_EVEN** = ``0`` + +Assign amounts so that they monotonically increase from ``0.0`` to ``1.0``, ensuring all weights are equal. For example, with five joints, the amounts would be ``0.2``, ``0.4``, ``0.6``, ``0.8``, and ``1.0`` starting from the root bone. + +.. _class_BoneTwistDisperser3D_constant_DISPERSE_MODE_WEIGHTED: + +.. rst-class:: classref-enumeration-constant + +:ref:`DisperseMode` **DISPERSE_MODE_WEIGHTED** = ``1`` + +Assign amounts so that they monotonically increase from ``0.0`` to ``1.0``, based on the length of the bones between joint segments. See also :ref:`set_weight_position()`. + +.. _class_BoneTwistDisperser3D_constant_DISPERSE_MODE_CUSTOM: + +.. rst-class:: classref-enumeration-constant + +:ref:`DisperseMode` **DISPERSE_MODE_CUSTOM** = ``2`` + +You can assign arbitrary amounts to the joint list. See also :ref:`set_joint_twist_amount()`. + +When :ref:`is_end_bone_extended()` is ``false``, a child of the reference bone exists solely to determine the twist axis, so its custom amount has absolutely no effect at all. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_BoneTwistDisperser3D_property_mutable_bone_axes: + +.. rst-class:: classref-property + +:ref:`bool` **mutable_bone_axes** = ``true`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_mutable_bone_axes**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **are_bone_axes_mutable**\ (\ ) + +If ``true``, the solver retrieves the bone axis from the bone pose every frame. + +If ``false``, the solver retrieves the bone axis from the bone rest and caches it. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BoneTwistDisperser3D_property_setting_count: + +.. rst-class:: classref-property + +:ref:`int` **setting_count** = ``0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_setting_count**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_setting_count**\ (\ ) + +The number of settings. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_BoneTwistDisperser3D_method_clear_settings: + +.. rst-class:: classref-method + +|void| **clear_settings**\ (\ ) :ref:`🔗` + +Clears all settings. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BoneTwistDisperser3D_method_get_damping_curve: + +.. rst-class:: classref-method + +:ref:`Curve` **get_damping_curve**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the damping curve when :ref:`get_disperse_mode()` is :ref:`DISPERSE_MODE_CUSTOM`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BoneTwistDisperser3D_method_get_disperse_mode: + +.. rst-class:: classref-method + +:ref:`DisperseMode` **get_disperse_mode**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns whether to use automatic amount assignment or to allow manual assignment. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BoneTwistDisperser3D_method_get_end_bone: + +.. rst-class:: classref-method + +:ref:`int` **get_end_bone**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the end bone index of the bone chain. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BoneTwistDisperser3D_method_get_end_bone_direction: + +.. rst-class:: classref-method + +:ref:`BoneDirection` **get_end_bone_direction**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the tail direction of the end bone of the bone chain when :ref:`is_end_bone_extended()` is ``true``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BoneTwistDisperser3D_method_get_end_bone_name: + +.. rst-class:: classref-method + +:ref:`String` **get_end_bone_name**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the end bone name of the bone chain. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BoneTwistDisperser3D_method_get_joint_bone: + +.. rst-class:: classref-method + +:ref:`int` **get_joint_bone**\ (\ index\: :ref:`int`, joint\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the bone index at ``joint`` in the bone chain's joint list. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BoneTwistDisperser3D_method_get_joint_bone_name: + +.. rst-class:: classref-method + +:ref:`String` **get_joint_bone_name**\ (\ index\: :ref:`int`, joint\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the bone name at ``joint`` in the bone chain's joint list. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BoneTwistDisperser3D_method_get_joint_count: + +.. rst-class:: classref-method + +:ref:`int` **get_joint_count**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the joint count of the bone chain's joint list. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BoneTwistDisperser3D_method_get_joint_twist_amount: + +.. rst-class:: classref-method + +:ref:`float` **get_joint_twist_amount**\ (\ index\: :ref:`int`, joint\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the twist amount at ``joint`` in the bone chain's joint list when :ref:`get_disperse_mode()` is :ref:`DISPERSE_MODE_CUSTOM`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BoneTwistDisperser3D_method_get_reference_bone: + +.. rst-class:: classref-method + +:ref:`int` **get_reference_bone**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the reference bone to extract twist of the setting at ``index``. + +This bone is either the end of the chain or its parent, depending on :ref:`is_end_bone_extended()`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BoneTwistDisperser3D_method_get_reference_bone_name: + +.. rst-class:: classref-method + +:ref:`String` **get_reference_bone_name**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the reference bone name to extract twist of the setting at ``index``. + +This bone is either the end of the chain or its parent, depending on :ref:`is_end_bone_extended()`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BoneTwistDisperser3D_method_get_root_bone: + +.. rst-class:: classref-method + +:ref:`int` **get_root_bone**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the root bone index of the bone chain. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BoneTwistDisperser3D_method_get_root_bone_name: + +.. rst-class:: classref-method + +:ref:`String` **get_root_bone_name**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the root bone name of the bone chain. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BoneTwistDisperser3D_method_get_twist_from: + +.. rst-class:: classref-method + +:ref:`Quaternion` **get_twist_from**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the rotation to an arbitrary state before twisting for the current bone pose to extract the twist when :ref:`is_twist_from_rest()` is ``false``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BoneTwistDisperser3D_method_get_weight_position: + +.. rst-class:: classref-method + +:ref:`float` **get_weight_position**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the position at which to divide the segment between joints for weight assignment when :ref:`get_disperse_mode()` is :ref:`DISPERSE_MODE_WEIGHTED`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BoneTwistDisperser3D_method_is_end_bone_extended: + +.. rst-class:: classref-method + +:ref:`bool` **is_end_bone_extended**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns ``true`` if the end bone is extended to have a tail. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BoneTwistDisperser3D_method_is_twist_from_rest: + +.. rst-class:: classref-method + +:ref:`bool` **is_twist_from_rest**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns ``true`` if extracting the twist amount from the difference between the bone rest and the current bone pose. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BoneTwistDisperser3D_method_set_damping_curve: + +.. rst-class:: classref-method + +|void| **set_damping_curve**\ (\ index\: :ref:`int`, curve\: :ref:`Curve`\ ) :ref:`🔗` + +Sets the damping curve when :ref:`get_disperse_mode()` is :ref:`DISPERSE_MODE_CUSTOM`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BoneTwistDisperser3D_method_set_disperse_mode: + +.. rst-class:: classref-method + +|void| **set_disperse_mode**\ (\ index\: :ref:`int`, disperse_mode\: :ref:`DisperseMode`\ ) :ref:`🔗` + +Sets whether to use automatic amount assignment or to allow manual assignment. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BoneTwistDisperser3D_method_set_end_bone: + +.. rst-class:: classref-method + +|void| **set_end_bone**\ (\ index\: :ref:`int`, bone\: :ref:`int`\ ) :ref:`🔗` + +Sets the end bone index of the bone chain. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BoneTwistDisperser3D_method_set_end_bone_direction: + +.. rst-class:: classref-method + +|void| **set_end_bone_direction**\ (\ index\: :ref:`int`, bone_direction\: :ref:`BoneDirection`\ ) :ref:`🔗` + +Sets the end bone tail direction of the bone chain when :ref:`is_end_bone_extended()` is ``true``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BoneTwistDisperser3D_method_set_end_bone_name: + +.. rst-class:: classref-method + +|void| **set_end_bone_name**\ (\ index\: :ref:`int`, bone_name\: :ref:`String`\ ) :ref:`🔗` + +Sets the end bone name of the bone chain. + +\ **Note:** The end bone must be a child of the root bone. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BoneTwistDisperser3D_method_set_extend_end_bone: + +.. rst-class:: classref-method + +|void| **set_extend_end_bone**\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) :ref:`🔗` + +If ``enabled`` is ``true``, the end bone is extended to have a tail. + +If ``enabled`` is ``false``, :ref:`get_reference_bone()` becomes a parent of the end bone and it uses the vector to the end bone as a twist axis. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BoneTwistDisperser3D_method_set_joint_twist_amount: + +.. rst-class:: classref-method + +|void| **set_joint_twist_amount**\ (\ index\: :ref:`int`, joint\: :ref:`int`, twist_amount\: :ref:`float`\ ) :ref:`🔗` + +Sets the twist amount at ``joint`` in the bone chain's joint list when :ref:`get_disperse_mode()` is :ref:`DISPERSE_MODE_CUSTOM`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BoneTwistDisperser3D_method_set_root_bone: + +.. rst-class:: classref-method + +|void| **set_root_bone**\ (\ index\: :ref:`int`, bone\: :ref:`int`\ ) :ref:`🔗` + +Sets the root bone index of the bone chain. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BoneTwistDisperser3D_method_set_root_bone_name: + +.. rst-class:: classref-method + +|void| **set_root_bone_name**\ (\ index\: :ref:`int`, bone_name\: :ref:`String`\ ) :ref:`🔗` + +Sets the root bone name of the bone chain. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BoneTwistDisperser3D_method_set_twist_from: + +.. rst-class:: classref-method + +|void| **set_twist_from**\ (\ index\: :ref:`int`, from\: :ref:`Quaternion`\ ) :ref:`🔗` + +Sets the rotation to an arbitrary state before twisting for the current bone pose to extract the twist when :ref:`is_twist_from_rest()` is ``false``. + +In other words, by calling :ref:`set_twist_from()` by :ref:`SkeletonModifier3D.modification_processed` of a specific :ref:`SkeletonModifier3D`, you can extract only the twists generated by modifiers processed after that but before this **BoneTwistDisperser3D**. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BoneTwistDisperser3D_method_set_twist_from_rest: + +.. rst-class:: classref-method + +|void| **set_twist_from_rest**\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) :ref:`🔗` + +If ``enabled`` is ``true``, it extracts the twist amount from the difference between the bone rest and the current bone pose. + +If ``enabled`` is ``false``, it extracts the twist amount from the difference between :ref:`get_twist_from()` and the current bone pose. See also :ref:`set_twist_from()`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BoneTwistDisperser3D_method_set_weight_position: + +.. rst-class:: classref-method + +|void| **set_weight_position**\ (\ index\: :ref:`int`, weight_position\: :ref:`float`\ ) :ref:`🔗` + +Sets the position at which to divide the segment between joints for weight assignment when :ref:`get_disperse_mode()` is :ref:`DISPERSE_MODE_WEIGHTED`. + +For example, when ``weight_position`` is ``0.5``, if two bone segments with a length of ``1.0`` exist between three joints, weights are assigned to each joint from root to end at ratios of ``0.5``, ``1.0``, and ``0.5``. Then amounts become ``0.25``, ``0.75``, and ``1.0`` respectively. + +.. |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.)` diff --git a/classes/class_cameraattributes.rst b/classes/class_cameraattributes.rst index d79914732cc..371f5445fa2 100644 --- a/classes/class_cameraattributes.rst +++ b/classes/class_cameraattributes.rst @@ -71,6 +71,8 @@ Property Descriptions If ``true``, enables the tonemapping auto exposure mode of the scene renderer. If ``true``, the renderer will automatically determine the exposure setting to adapt to the scene's illumination and the observed light. +\ **Note:** Auto-exposure is only supported in the Forward+ rendering method, not Mobile or Compatibility. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_cameraattributesphysical.rst b/classes/class_cameraattributesphysical.rst index 529fd930152..caf1272a65b 100644 --- a/classes/class_cameraattributesphysical.rst +++ b/classes/class_cameraattributesphysical.rst @@ -27,6 +27,8 @@ The default settings are intended for use in an outdoor environment, tips for se \ **Note:** Depth of field blur is only supported in the Forward+ and Mobile rendering methods, not Compatibility. +\ **Note:** Auto-exposure is only supported in the Forward+ rendering method, not Mobile or Compatibility. + .. rst-class:: classref-introduction-group Tutorials diff --git a/classes/class_cameraattributespractical.rst b/classes/class_cameraattributespractical.rst index 73d0d636ca5..bde8a03a30a 100644 --- a/classes/class_cameraattributespractical.rst +++ b/classes/class_cameraattributespractical.rst @@ -23,6 +23,10 @@ Controls camera-specific attributes such as auto-exposure, depth of field, and e When used in a :ref:`WorldEnvironment` it provides default settings for exposure, auto-exposure, and depth of field that will be used by all cameras without their own :ref:`CameraAttributes`, including the editor camera. When used in a :ref:`Camera3D` it will override any :ref:`CameraAttributes` set in the :ref:`WorldEnvironment`. When used in :ref:`VoxelGI` or :ref:`LightmapGI`, only the exposure settings will be used. +\ **Note:** Depth of field blur is only supported in the Forward+ and Mobile rendering methods, not Compatibility. + +\ **Note:** Auto-exposure is only supported in the Forward+ rendering method, not Mobile or Compatibility. + .. rst-class:: classref-reftable-group Properties diff --git a/classes/class_ccdik3d.rst b/classes/class_ccdik3d.rst new file mode 100644 index 00000000000..56becf5e66c --- /dev/null +++ b/classes/class_ccdik3d.rst @@ -0,0 +1,36 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Redot engine sources. +.. Generator: https://github.com/Redot-Engine/redot-engine/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/Redot-Engine/redot-engine/tree/master/doc/classes/CCDIK3D.xml. + +.. _class_CCDIK3D: + +CCDIK3D +======= + +**Inherits:** :ref:`IterateIK3D` **<** :ref:`ChainIK3D` **<** :ref:`IKModifier3D` **<** :ref:`SkeletonModifier3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` + +Rotation based cyclic coordinate descent inverse kinematics solver. + +.. rst-class:: classref-introduction-group + +Description +----------- + +**CCDIK3D** is rotation based IK, enabling fast and effective tracking even with large joint rotations. It's especially suitable for chains with limitations, providing smoother and more stable target tracking compared to :ref:`FABRIK3D`. + +The resulting twist around the forward vector will always be kept from the previous pose. + +\ **Note:** When the target is close to the root, it can cause unnatural movement, including joint flips and oscillations. + +.. |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.)` diff --git a/classes/class_chainik3d.rst b/classes/class_chainik3d.rst new file mode 100644 index 00000000000..7cf5c634fe6 --- /dev/null +++ b/classes/class_chainik3d.rst @@ -0,0 +1,291 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Redot engine sources. +.. Generator: https://github.com/Redot-Engine/redot-engine/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/Redot-Engine/redot-engine/tree/master/doc/classes/ChainIK3D.xml. + +.. _class_ChainIK3D: + +ChainIK3D +========= + +**Inherits:** :ref:`IKModifier3D` **<** :ref:`SkeletonModifier3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` + +**Inherited By:** :ref:`IterateIK3D`, :ref:`SplineIK3D` + +A :ref:`SkeletonModifier3D` to apply inverse kinematics to bone chains containing an arbitrary number of bones. + +.. rst-class:: classref-introduction-group + +Description +----------- + +Base class of :ref:`SkeletonModifier3D` that automatically generates a joint list from the bones between the root bone and the end bone. + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_end_bone`\ (\ index\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`BoneDirection` | :ref:`get_end_bone_direction`\ (\ index\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_end_bone_length`\ (\ index\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_end_bone_name`\ (\ index\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_joint_bone`\ (\ index\: :ref:`int`, joint\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_joint_bone_name`\ (\ index\: :ref:`int`, joint\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_joint_count`\ (\ index\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_root_bone`\ (\ index\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_root_bone_name`\ (\ index\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_end_bone_extended`\ (\ index\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_end_bone`\ (\ index\: :ref:`int`, bone\: :ref:`int`\ ) | + +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_end_bone_direction`\ (\ index\: :ref:`int`, bone_direction\: :ref:`BoneDirection`\ ) | + +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_end_bone_length`\ (\ index\: :ref:`int`, length\: :ref:`float`\ ) | + +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_end_bone_name`\ (\ index\: :ref:`int`, bone_name\: :ref:`String`\ ) | + +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_extend_end_bone`\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) | + +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_root_bone`\ (\ index\: :ref:`int`, bone\: :ref:`int`\ ) | + +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_root_bone_name`\ (\ index\: :ref:`int`, bone_name\: :ref:`String`\ ) | + +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_ChainIK3D_method_get_end_bone: + +.. rst-class:: classref-method + +:ref:`int` **get_end_bone**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the end bone index of the bone chain. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ChainIK3D_method_get_end_bone_direction: + +.. rst-class:: classref-method + +:ref:`BoneDirection` **get_end_bone_direction**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the tail direction of the end bone of the bone chain when :ref:`is_end_bone_extended()` is ``true``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ChainIK3D_method_get_end_bone_length: + +.. rst-class:: classref-method + +:ref:`float` **get_end_bone_length**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the end bone tail length of the bone chain when :ref:`is_end_bone_extended()` is ``true``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ChainIK3D_method_get_end_bone_name: + +.. rst-class:: classref-method + +:ref:`String` **get_end_bone_name**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the end bone name of the bone chain. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ChainIK3D_method_get_joint_bone: + +.. rst-class:: classref-method + +:ref:`int` **get_joint_bone**\ (\ index\: :ref:`int`, joint\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the bone index at ``joint`` in the bone chain's joint list. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ChainIK3D_method_get_joint_bone_name: + +.. rst-class:: classref-method + +:ref:`String` **get_joint_bone_name**\ (\ index\: :ref:`int`, joint\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the bone name at ``joint`` in the bone chain's joint list. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ChainIK3D_method_get_joint_count: + +.. rst-class:: classref-method + +:ref:`int` **get_joint_count**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the joint count of the bone chain's joint list. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ChainIK3D_method_get_root_bone: + +.. rst-class:: classref-method + +:ref:`int` **get_root_bone**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the root bone index of the bone chain. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ChainIK3D_method_get_root_bone_name: + +.. rst-class:: classref-method + +:ref:`String` **get_root_bone_name**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the root bone name of the bone chain. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ChainIK3D_method_is_end_bone_extended: + +.. rst-class:: classref-method + +:ref:`bool` **is_end_bone_extended**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns ``true`` if the end bone is extended to have a tail. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ChainIK3D_method_set_end_bone: + +.. rst-class:: classref-method + +|void| **set_end_bone**\ (\ index\: :ref:`int`, bone\: :ref:`int`\ ) :ref:`🔗` + +Sets the end bone index of the bone chain. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ChainIK3D_method_set_end_bone_direction: + +.. rst-class:: classref-method + +|void| **set_end_bone_direction**\ (\ index\: :ref:`int`, bone_direction\: :ref:`BoneDirection`\ ) :ref:`🔗` + +Sets the end bone tail direction of the bone chain when :ref:`is_end_bone_extended()` is ``true``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ChainIK3D_method_set_end_bone_length: + +.. rst-class:: classref-method + +|void| **set_end_bone_length**\ (\ index\: :ref:`int`, length\: :ref:`float`\ ) :ref:`🔗` + +Sets the end bone tail length of the bone chain when :ref:`is_end_bone_extended()` is ``true``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ChainIK3D_method_set_end_bone_name: + +.. rst-class:: classref-method + +|void| **set_end_bone_name**\ (\ index\: :ref:`int`, bone_name\: :ref:`String`\ ) :ref:`🔗` + +Sets the end bone name of the bone chain. + +\ **Note:** The end bone must be the root bone or a child of the root bone. If they are the same, the tail must be extended by :ref:`set_extend_end_bone()` to modify the bone. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ChainIK3D_method_set_extend_end_bone: + +.. rst-class:: classref-method + +|void| **set_extend_end_bone**\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) :ref:`🔗` + +If ``enabled`` is ``true``, the end bone is extended to have a tail. + +The extended tail config is allocated to the last element in the joint list. In other words, if you set ``enabled`` to ``false``, the config of the last element in the joint list has no effect in the simulated result. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ChainIK3D_method_set_root_bone: + +.. rst-class:: classref-method + +|void| **set_root_bone**\ (\ index\: :ref:`int`, bone\: :ref:`int`\ ) :ref:`🔗` + +Sets the root bone index of the bone chain. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ChainIK3D_method_set_root_bone_name: + +.. rst-class:: classref-method + +|void| **set_root_bone_name**\ (\ index\: :ref:`int`, bone_name\: :ref:`String`\ ) :ref:`🔗` + +Sets the root bone name of the bone chain. + +.. |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.)` diff --git a/classes/class_color.rst b/classes/class_color.rst index daf3b9c2ddb..592e6ffbe30 100644 --- a/classes/class_color.rst +++ b/classes/class_color.rst @@ -112,6 +112,8 @@ Methods .. table:: :widths: auto + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`apply_intensity`\ (\ intensity\: :ref:`float`\ ) |const| | +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Color` | :ref:`blend`\ (\ over\: :ref:`Color`\ ) |const| | +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -1681,6 +1683,22 @@ Constructs a **Color** from RGBA values, typically between 0.0 and 1.0. Method Descriptions ------------------- +.. _class_Color_method_apply_intensity: + +.. rst-class:: classref-method + +:ref:`Color` **apply_intensity**\ (\ intensity\: :ref:`float`\ ) |const| :ref:`🔗` + +Adjusts the color's intensity by multiplying the RGB components with a factor derived from the given intensity. + +The factor is calculated as 2 raised to the power of the provided intensity value. + +The adjusted RGB values are clamped to the range ``0.0`` and ``1.0``. + +.. rst-class:: classref-item-separator + +---- + .. _class_Color_method_blend: .. rst-class:: classref-method diff --git a/classes/class_colorpicker.rst b/classes/class_colorpicker.rst index bf14c54d487..559ded4e5a0 100644 --- a/classes/class_colorpicker.rst +++ b/classes/class_colorpicker.rst @@ -57,6 +57,8 @@ Properties +----------------------------------------------------------+----------------------------------------------------------------------------+-----------------------+ | :ref:`bool` | :ref:`hex_visible` | ``true`` | +----------------------------------------------------------+----------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`intensity` | ``0.0`` | + +----------------------------------------------------------+----------------------------------------------------------------------------+-----------------------+ | :ref:`Color` | :ref:`old_color` | ``Color(0, 0, 0, 1)`` | +----------------------------------------------------------+----------------------------------------------------------------------------+-----------------------+ | :ref:`PickerShapeType` | :ref:`picker_shape` | ``0`` | @@ -484,6 +486,25 @@ If ``true``, the hex color code input field is visible. ---- +.. _class_ColorPicker_property_intensity: + +.. rst-class:: classref-property + +:ref:`float` **intensity** = ``0.0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_intensity**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_intensity**\ (\ ) + +The currently selected intensity. + +Note: ``set_intensity`` clamps the value in the range ``[-10.0, 10.0]`` + +.. rst-class:: classref-item-separator + +---- + .. _class_ColorPicker_property_old_color: .. rst-class:: classref-property diff --git a/classes/class_converttransformmodifier3d.rst b/classes/class_converttransformmodifier3d.rst index 94058ab2e9d..8609a6e767d 100644 --- a/classes/class_converttransformmodifier3d.rst +++ b/classes/class_converttransformmodifier3d.rst @@ -39,6 +39,10 @@ There are 4 ways to apply the transform, depending on the combination of :ref:`s - Extract reference pose absolutely and the apply bone's pose is replaced with it. +\ **Note:** Relative option is available only in the case :ref:`BoneConstraint3D.get_reference_type()` is :ref:`BoneConstraint3D.REFERENCE_TYPE_BONE`. See also :ref:`ReferenceType`. + +\ **Note:** If there is a rotation greater than ``180`` degrees with constrained axes, flipping may occur. + .. rst-class:: classref-reftable-group Properties diff --git a/classes/class_copytransformmodifier3d.rst b/classes/class_copytransformmodifier3d.rst index a299e191ff1..6042528d965 100644 --- a/classes/class_copytransformmodifier3d.rst +++ b/classes/class_copytransformmodifier3d.rst @@ -39,6 +39,8 @@ There are 4 ways to apply the transform, depending on the combination of :ref:`s - Extract reference pose absolutely and the apply bone's pose is replaced with it. +\ **Note:** Relative option is available only in the case :ref:`BoneConstraint3D.get_reference_type()` is :ref:`BoneConstraint3D.REFERENCE_TYPE_BONE`. See also :ref:`ReferenceType`. + .. rst-class:: classref-reftable-group Properties diff --git a/classes/class_dictionary.rst b/classes/class_dictionary.rst index 70c5e7f8a7d..f65fa80b7a4 100644 --- a/classes/class_dictionary.rst +++ b/classes/class_dictionary.rst @@ -489,6 +489,15 @@ Finds and returns the first key whose associated value is equal to ``value``, or Returns the corresponding value for the given ``key`` in the dictionary. If the ``key`` does not exist, returns ``default``, or ``null`` if the parameter is omitted. +\ **Note:** If the ``default`` argument is computationally expensive or has unwanted side effects, consider using the :ref:`has()` method instead: + +:: + + # Always calls `expensive_function()`. + dict.get("key", expensive_function()) + # Calls `expensive_function()` only if the key does not exist. + dict.get("key") if dict.has("key") else expensive_function() + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_editorsettings.rst b/classes/class_editorsettings.rst index 0fcc255d97f..4e4a9f1150a 100644 --- a/classes/class_editorsettings.rst +++ b/classes/class_editorsettings.rst @@ -227,6 +227,8 @@ Properties +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Color` | :ref:`editors/3d_gizmos/gizmo_colors/gridmap_grid` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/3d_gizmos/gizmo_colors/ik_chain` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Color` | :ref:`editors/3d_gizmos/gizmo_colors/instantiated` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Color` | :ref:`editors/3d_gizmos/gizmo_colors/joint` | @@ -785,6 +787,8 @@ Properties +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`text_editor/external/exec_path` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/external/prefer_tabs_in_external_editor` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`text_editor/external/use_external_editor` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`text_editor/help/class_reference_examples` | @@ -2051,6 +2055,18 @@ The 3D editor gizmo color for the :ref:`GridMap` grid. ---- +.. _class_EditorSettings_property_editors/3d_gizmos/gizmo_colors/ik_chain: + +.. rst-class:: classref-property + +:ref:`Color` **editors/3d_gizmos/gizmo_colors/ik_chain** :ref:`🔗` + +The 3D editor gizmo color for the :ref:`IKModifier3D` guides. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_editors/3d_gizmos/gizmo_colors/instantiated: .. rst-class:: classref-property @@ -5668,6 +5684,20 @@ The path to the text editor executable used to edit text files if :ref:`text_edi ---- +.. _class_EditorSettings_property_text_editor/external/prefer_tabs_in_external_editor: + +.. rst-class:: classref-property + +:ref:`bool` **text_editor/external/prefer_tabs_in_external_editor** :ref:`🔗` + +If set, this will instruct the editor to attempt to reopen previously open scripts as tabs in a single instance of the external editor, + +by passing them in as command line args instead of trying to launch a single instance for each script file. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_text_editor/external/use_external_editor: .. rst-class:: classref-property diff --git a/classes/class_engine.rst b/classes/class_engine.rst index 27e59d8eb39..b79a2abe3f1 100644 --- a/classes/class_engine.rst +++ b/classes/class_engine.rst @@ -356,7 +356,7 @@ Every :ref:`Dictionary` contains a ``name`` identifier, and a Returns a :ref:`Dictionary` of categorized donor names. Each entry is an :ref:`Array` of strings: -{``donors``} +\ ``donors`` .. rst-class:: classref-item-separator diff --git a/classes/class_fabrik3d.rst b/classes/class_fabrik3d.rst new file mode 100644 index 00000000000..00f332c589d --- /dev/null +++ b/classes/class_fabrik3d.rst @@ -0,0 +1,43 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Redot engine sources. +.. Generator: https://github.com/Redot-Engine/redot-engine/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/Redot-Engine/redot-engine/tree/master/doc/classes/FABRIK3D.xml. + +.. _class_FABRIK3D: + +FABRIK3D +======== + +**Inherits:** :ref:`IterateIK3D` **<** :ref:`ChainIK3D` **<** :ref:`IKModifier3D` **<** :ref:`SkeletonModifier3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` + +Position based forward and backward reaching inverse kinematics solver. + +.. rst-class:: classref-introduction-group + +Description +----------- + +**FABRIK3D** is position based IK, allowing precise and accurate tracking of targets. It's ideal for simple chains without limitations. + +The resulting twist around the forward vector will always be kept from the previous pose. + +\ **Note:** When the target is close to the root, it tends to produce zig-zag patterns, resulting in unnatural visual movement. + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- `Inverse Kinematics Returns to Godot 4.6 - IKModifier3D `__ + +.. |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.)` diff --git a/classes/class_foldablecontainer.rst b/classes/class_foldablecontainer.rst index cb4cd345bec..e25b46448a9 100644 --- a/classes/class_foldablecontainer.rst +++ b/classes/class_foldablecontainer.rst @@ -211,7 +211,7 @@ The :ref:`FoldableGroup` associated with the container. Whe - |void| **set_folded**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_folded**\ (\ ) -If ``true``, the container will becomes folded and will hide all its children. +If ``true``, the container will become folded and will hide all its children. .. rst-class:: classref-item-separator diff --git a/classes/class_gdscript.rst b/classes/class_gdscript.rst index b198f4d1137..88b07170098 100644 --- a/classes/class_gdscript.rst +++ b/classes/class_gdscript.rst @@ -25,6 +25,33 @@ Calling :ref:`new()` creates a new instance of the sc If you are looking for GDScript's built-in functions, see :ref:`@GDScript` instead. +\ **Nullable static types:** By default, a statically-typed value cannot be ``null``. Writing ``?`` after a type hint makes the value *nullable*, allowing it to hold ``null`` in addition to values of the base type. Untyped values and :ref:`Variant` can already hold ``null``, so :ref:`Variant` is always nullable and does not take the ``?`` suffix. The suffix is allowed on variables, members, parameters, and return types: + +:: + + var health: int? # An int or null; uninitialized nullable values start as null. + var player_name: String? = null + + func find_target() -> Node?: # May return null. + return null + +The ``?`` suffix works on built-in value types (``int?``, ``String?``, ``Vector2?``, and so on), enums (including nested enums such as ``Vector2.Axis?``), objects (such as ``Node?``), and collections, where the collection itself is nullable (``Array?``, ``Array[int]?``, ``Dictionary[String, int]?``). It is **not** allowed on :ref:`Variant` (already nullable), on ``void``, or on element types: ``Array[int?]`` is rejected; write ``Array[int]?`` instead. + +After a ``null`` check, the analyzer narrows the value to its non-nullable type, so it can be used safely: + +:: + + func take(v: int?) -> int: + if v == null: + return -1 + return v + 1 # v is known to be non-null here. + +Narrowing is recognized for ``==`` and ``!=`` ``null`` guards — including ``else`` branches, ``while`` conditions, and ``and``/``or`` expressions — and is kept when the value is reassigned to a non-null value. It is not recognized after reassigning a nullable value, or across ``break`` and ``continue`` guards. + +Using a nullable value of a **non-object built-in type** (such as ``int?``, ``Array?``, or ``Dictionary?``) directly (in an operator, subscript, property access, or ``for`` loop), or transferring *any* nullable value to a non-nullable target (assigning, returning, or passing it as an argument), raises the ``UNSAFE_NULLABLE_ACCESS`` warning. Set its severity with :ref:`ProjectSettings.debug/gdscript/warnings/unsafe_nullable_access`, or silence a single line with :ref:`@GDScript.@warning_ignore`. + +Enforcement depends on the type. For non-object built-in types and enums, a ``null`` reaching a non-nullable value raises a runtime error. Object references keep GDScript's existing behavior — they may hold ``null`` whether or not the type uses ``?`` — so on object types ``?`` only enables narrowing and the transfer warning. Accessing a member or calling a method directly on a nullable object or enum is not flagged, but it still fails at runtime if the value is actually ``null``, so narrow with a ``null`` check first. + .. rst-class:: classref-introduction-group Tutorials diff --git a/classes/class_gridmap.rst b/classes/class_gridmap.rst index 0419f7296c0..e7b098c4fe6 100644 --- a/classes/class_gridmap.rst +++ b/classes/class_gridmap.rst @@ -619,7 +619,20 @@ Generates a baked mesh that represents all meshes in the assigned :ref:`MeshLibr :ref:`Vector3` **map_to_local**\ (\ map_position\: :ref:`Vector3i`\ ) |const| :ref:`🔗` -Returns the position of a grid cell in the GridMap's local coordinate space. To convert the returned value into global coordinates, use :ref:`Node3D.to_global()`. See also :ref:`local_to_map()`. +Returns the position of a grid cell in the GridMap's local coordinate space. The returned position, for each axis, is either cell center or the cell edge closer to negative infinity, based on the values of :ref:`cell_center_x`, :ref:`cell_center_y`, :ref:`cell_center_z`. To convert the returned value into global coordinates, use :ref:`Node3D.to_global()`. See also :ref:`local_to_map()`. + +:: + + # All examples for: cell_size = Vector3(2.0, 3.0, 4.0) + + # cell_center_x = true, cell_center_y = true, cell_center_z = true + map_to_local(Vector3i(0, 0, 0)) # Returns Vector3(1.0, 1.5, 2.0) + + # cell_center_x = false, cell_center_y = false, cell_center_z = false + map_to_local(Vector3i(0, 0, 0)) # Returns Vector3(0.0, 0.0, 0.0) + + # cell_center_x = true, cell_center_y = false, cell_center_z = true + map_to_local(Vector3i(0, 0, 0)) # Returns Vector3(1.0, 0.0, 2.0) .. rst-class:: classref-item-separator diff --git a/classes/class_ikmodifier3d.rst b/classes/class_ikmodifier3d.rst new file mode 100644 index 00000000000..87f3ba07d6d --- /dev/null +++ b/classes/class_ikmodifier3d.rst @@ -0,0 +1,148 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Redot engine sources. +.. Generator: https://github.com/Redot-Engine/redot-engine/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/Redot-Engine/redot-engine/tree/master/doc/classes/IKModifier3D.xml. + +.. _class_IKModifier3D: + +IKModifier3D +============ + +**Inherits:** :ref:`SkeletonModifier3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` + +**Inherited By:** :ref:`ChainIK3D`, :ref:`TwoBoneIK3D` + +A node for inverse kinematics which may modify more than one bone. + +.. rst-class:: classref-introduction-group + +Description +----------- + +Base class of :ref:`SkeletonModifier3D`\ s that has some joint lists and applies inverse kinematics. This class has some structs, enums, and helper methods which are useful to solve inverse kinematics. + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- `Inverse Kinematics Returns to Godot 4.6 - IKModifier3D `__ + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-------------------------+-------------------------------------------------------------------------+----------+ + | :ref:`bool` | :ref:`mutable_bone_axes` | ``true`` | + +-------------------------+-------------------------------------------------------------------------+----------+ + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +-----------------------+------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_settings`\ (\ ) | + +-----------------------+------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_setting_count`\ (\ ) |const| | + +-----------------------+------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`reset`\ (\ ) | + +-----------------------+------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_setting_count`\ (\ count\: :ref:`int`\ ) | + +-----------------------+------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_IKModifier3D_property_mutable_bone_axes: + +.. rst-class:: classref-property + +:ref:`bool` **mutable_bone_axes** = ``true`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_mutable_bone_axes**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **are_bone_axes_mutable**\ (\ ) + +If ``true``, the solver retrieves the bone axis from the bone pose every frame. + +If ``false``, the solver retrieves the bone axis from the bone rest and caches it, which increases performance slightly, but position changes in the bone pose made before processing this **IKModifier3D** are ignored. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_IKModifier3D_method_clear_settings: + +.. rst-class:: classref-method + +|void| **clear_settings**\ (\ ) :ref:`🔗` + +Clears all settings. + +.. rst-class:: classref-item-separator + +---- + +.. _class_IKModifier3D_method_get_setting_count: + +.. rst-class:: classref-method + +:ref:`int` **get_setting_count**\ (\ ) |const| :ref:`🔗` + +Returns the number of settings. + +.. rst-class:: classref-item-separator + +---- + +.. _class_IKModifier3D_method_reset: + +.. rst-class:: classref-method + +|void| **reset**\ (\ ) :ref:`🔗` + +Resets a state with respect to the current bone pose. + +.. rst-class:: classref-item-separator + +---- + +.. _class_IKModifier3D_method_set_setting_count: + +.. rst-class:: classref-method + +|void| **set_setting_count**\ (\ count\: :ref:`int`\ ) :ref:`🔗` + +Sets the number of settings. + +.. |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.)` diff --git a/classes/class_iterateik3d.rst b/classes/class_iterateik3d.rst new file mode 100644 index 00000000000..4b35ec8a2eb --- /dev/null +++ b/classes/class_iterateik3d.rst @@ -0,0 +1,385 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Redot engine sources. +.. Generator: https://github.com/Redot-Engine/redot-engine/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/Redot-Engine/redot-engine/tree/master/doc/classes/IterateIK3D.xml. + +.. _class_IterateIK3D: + +IterateIK3D +=========== + +**Inherits:** :ref:`ChainIK3D` **<** :ref:`IKModifier3D` **<** :ref:`SkeletonModifier3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` + +**Inherited By:** :ref:`CCDIK3D`, :ref:`FABRIK3D`, :ref:`JacobianIK3D` + +A :ref:`SkeletonModifier3D` to approach the goal by repeating small rotations. + +.. rst-class:: classref-introduction-group + +Description +----------- + +Base class of :ref:`SkeletonModifier3D` to approach the goal by repeating small rotations. + +Each bone chain (setting) has one effector, which is processed in order of the setting list. You can set some limitations for each joint. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +---------------------------+----------------------------------------------------------------------------+-----------------+ + | :ref:`float` | :ref:`angular_delta_limit` | ``0.034906585`` | + +---------------------------+----------------------------------------------------------------------------+-----------------+ + | :ref:`bool` | :ref:`deterministic` | ``false`` | + +---------------------------+----------------------------------------------------------------------------+-----------------+ + | :ref:`int` | :ref:`max_iterations` | ``4`` | + +---------------------------+----------------------------------------------------------------------------+-----------------+ + | :ref:`float` | :ref:`min_distance` | ``0.001`` | + +---------------------------+----------------------------------------------------------------------------+-----------------+ + | :ref:`int` | :ref:`setting_count` | ``0`` | + +---------------------------+----------------------------------------------------------------------------+-----------------+ + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`JointLimitation3D` | :ref:`get_joint_limitation`\ (\ index\: :ref:`int`, joint\: :ref:`int`\ ) |const| | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`SecondaryDirection` | :ref:`get_joint_limitation_right_axis`\ (\ index\: :ref:`int`, joint\: :ref:`int`\ ) |const| | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_joint_limitation_right_axis_vector`\ (\ index\: :ref:`int`, joint\: :ref:`int`\ ) |const| | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion` | :ref:`get_joint_limitation_rotation_offset`\ (\ index\: :ref:`int`, joint\: :ref:`int`\ ) |const| | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RotationAxis` | :ref:`get_joint_rotation_axis`\ (\ index\: :ref:`int`, joint\: :ref:`int`\ ) |const| | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_joint_rotation_axis_vector`\ (\ index\: :ref:`int`, joint\: :ref:`int`\ ) |const| | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`NodePath` | :ref:`get_target_node`\ (\ index\: :ref:`int`\ ) |const| | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_joint_limitation`\ (\ index\: :ref:`int`, joint\: :ref:`int`, limitation\: :ref:`JointLimitation3D`\ ) | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_joint_limitation_right_axis`\ (\ index\: :ref:`int`, joint\: :ref:`int`, direction\: :ref:`SecondaryDirection`\ ) | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_joint_limitation_right_axis_vector`\ (\ index\: :ref:`int`, joint\: :ref:`int`, vector\: :ref:`Vector3`\ ) | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_joint_limitation_rotation_offset`\ (\ index\: :ref:`int`, joint\: :ref:`int`, offset\: :ref:`Quaternion`\ ) | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_joint_rotation_axis`\ (\ index\: :ref:`int`, joint\: :ref:`int`, axis\: :ref:`RotationAxis`\ ) | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_joint_rotation_axis_vector`\ (\ index\: :ref:`int`, joint\: :ref:`int`, axis_vector\: :ref:`Vector3`\ ) | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_target_node`\ (\ index\: :ref:`int`, target_node\: :ref:`NodePath`\ ) | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_IterateIK3D_property_angular_delta_limit: + +.. rst-class:: classref-property + +:ref:`float` **angular_delta_limit** = ``0.034906585`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_angular_delta_limit**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_angular_delta_limit**\ (\ ) + +The maximum amount each bone can rotate in a single iteration. + +\ **Note:** This limitation is applied during each iteration. For example, if :ref:`max_iterations` is ``4`` and :ref:`angular_delta_limit` is ``5`` degrees, the maximum rotation possible in a single frame is ``20`` degrees. + +.. rst-class:: classref-item-separator + +---- + +.. _class_IterateIK3D_property_deterministic: + +.. rst-class:: classref-property + +:ref:`bool` **deterministic** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_deterministic**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_deterministic**\ (\ ) + +If ``false``, the result is calculated from the previous frame's **IterateIK3D** result as the initial state. + +If ``true``, the previous frame's **IterateIK3D** result is discarded. At this point, the new result is calculated from the bone pose excluding the **IterateIK3D** as the initial state. This means the result will be always equal as long as the target position and the previous bone pose are the same. However, if :ref:`angular_delta_limit` and :ref:`max_iterations` are set too small, the end bone of the chain will never reach the target. + +.. rst-class:: classref-item-separator + +---- + +.. _class_IterateIK3D_property_max_iterations: + +.. rst-class:: classref-property + +:ref:`int` **max_iterations** = ``4`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_max_iterations**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_max_iterations**\ (\ ) + +The number of iteration loops used by the IK solver to produce more accurate results. + +.. rst-class:: classref-item-separator + +---- + +.. _class_IterateIK3D_property_min_distance: + +.. rst-class:: classref-property + +:ref:`float` **min_distance** = ``0.001`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_min_distance**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_min_distance**\ (\ ) + +The minimum distance between the end bone and the target. If the distance is below this value, the IK solver stops any further iterations. + +.. rst-class:: classref-item-separator + +---- + +.. _class_IterateIK3D_property_setting_count: + +.. rst-class:: classref-property + +:ref:`int` **setting_count** = ``0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_setting_count**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_setting_count**\ (\ ) + +The number of settings. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_IterateIK3D_method_get_joint_limitation: + +.. rst-class:: classref-method + +:ref:`JointLimitation3D` **get_joint_limitation**\ (\ index\: :ref:`int`, joint\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the joint limitation at ``joint`` in the bone chain's joint list. + +.. rst-class:: classref-item-separator + +---- + +.. _class_IterateIK3D_method_get_joint_limitation_right_axis: + +.. rst-class:: classref-method + +:ref:`SecondaryDirection` **get_joint_limitation_right_axis**\ (\ index\: :ref:`int`, joint\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the joint limitation right axis at ``joint`` in the bone chain's joint list. + +.. rst-class:: classref-item-separator + +---- + +.. _class_IterateIK3D_method_get_joint_limitation_right_axis_vector: + +.. rst-class:: classref-method + +:ref:`Vector3` **get_joint_limitation_right_axis_vector**\ (\ index\: :ref:`int`, joint\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the joint limitation right axis vector at ``joint`` in the bone chain's joint list. + +If :ref:`get_joint_limitation_right_axis()` is :ref:`SkeletonModifier3D.SECONDARY_DIRECTION_NONE`, this method returns ``Vector3(0, 0, 0)``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_IterateIK3D_method_get_joint_limitation_rotation_offset: + +.. rst-class:: classref-method + +:ref:`Quaternion` **get_joint_limitation_rotation_offset**\ (\ index\: :ref:`int`, joint\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the joint limitation rotation offset at ``joint`` in the bone chain's joint list. + +Rotation is done in the local space which is constructed by the bone direction (in general parent to child) as the +Y axis and :ref:`get_joint_limitation_right_axis_vector()` as the +X axis. + +If the +X and +Y axes are not orthogonal, the +X axis is implicitly modified to make it orthogonal. + +Also, if the length of :ref:`get_joint_limitation_right_axis_vector()` is zero, the space is created by rotating the bone rest using the shortest arc that rotates the +Y axis of the bone rest to match the bone direction. + +.. rst-class:: classref-item-separator + +---- + +.. _class_IterateIK3D_method_get_joint_rotation_axis: + +.. rst-class:: classref-method + +:ref:`RotationAxis` **get_joint_rotation_axis**\ (\ index\: :ref:`int`, joint\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the rotation axis at ``joint`` in the bone chain's joint list. + +.. rst-class:: classref-item-separator + +---- + +.. _class_IterateIK3D_method_get_joint_rotation_axis_vector: + +.. rst-class:: classref-method + +:ref:`Vector3` **get_joint_rotation_axis_vector**\ (\ index\: :ref:`int`, joint\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the rotation axis vector for the specified joint in the bone chain. This vector represents the axis around which the joint can rotate. It is determined based on the rotation axis set for the joint. + +If :ref:`get_joint_rotation_axis()` is :ref:`SkeletonModifier3D.ROTATION_AXIS_ALL`, this method returns ``Vector3(0, 0, 0)``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_IterateIK3D_method_get_target_node: + +.. rst-class:: classref-method + +:ref:`NodePath` **get_target_node**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the target node that the end bone is trying to reach. + +.. rst-class:: classref-item-separator + +---- + +.. _class_IterateIK3D_method_set_joint_limitation: + +.. rst-class:: classref-method + +|void| **set_joint_limitation**\ (\ index\: :ref:`int`, joint\: :ref:`int`, limitation\: :ref:`JointLimitation3D`\ ) :ref:`🔗` + +Sets the joint limitation at ``joint`` in the bone chain's joint list. + +.. rst-class:: classref-item-separator + +---- + +.. _class_IterateIK3D_method_set_joint_limitation_right_axis: + +.. rst-class:: classref-method + +|void| **set_joint_limitation_right_axis**\ (\ index\: :ref:`int`, joint\: :ref:`int`, direction\: :ref:`SecondaryDirection`\ ) :ref:`🔗` + +Sets the joint limitation right axis at ``joint`` in the bone chain's joint list. + +.. rst-class:: classref-item-separator + +---- + +.. _class_IterateIK3D_method_set_joint_limitation_right_axis_vector: + +.. rst-class:: classref-method + +|void| **set_joint_limitation_right_axis_vector**\ (\ index\: :ref:`int`, joint\: :ref:`int`, vector\: :ref:`Vector3`\ ) :ref:`🔗` + +Sets the optional joint limitation right axis vector at ``joint`` in the bone chain's joint list. + +.. rst-class:: classref-item-separator + +---- + +.. _class_IterateIK3D_method_set_joint_limitation_rotation_offset: + +.. rst-class:: classref-method + +|void| **set_joint_limitation_rotation_offset**\ (\ index\: :ref:`int`, joint\: :ref:`int`, offset\: :ref:`Quaternion`\ ) :ref:`🔗` + +Sets the joint limitation rotation offset at ``joint`` in the bone chain's joint list. + +Rotation is done in the local space which is constructed by the bone direction (in general parent to child) as the +Y axis and :ref:`get_joint_limitation_right_axis_vector()` as the +X axis. + +If the +X and +Y axes are not orthogonal, the +X axis is implicitly modified to make it orthogonal. + +Also, if the length of :ref:`get_joint_limitation_right_axis_vector()` is zero, the space is created by rotating the bone rest using the shortest arc that rotates the +Y axis of the bone rest to match the bone direction. + +.. rst-class:: classref-item-separator + +---- + +.. _class_IterateIK3D_method_set_joint_rotation_axis: + +.. rst-class:: classref-method + +|void| **set_joint_rotation_axis**\ (\ index\: :ref:`int`, joint\: :ref:`int`, axis\: :ref:`RotationAxis`\ ) :ref:`🔗` + +Sets the rotation axis at ``joint`` in the bone chain's joint list. + +The axes are based on the :ref:`Skeleton3D.get_bone_rest()`'s space, if ``axis`` is :ref:`SkeletonModifier3D.ROTATION_AXIS_CUSTOM`, you can specify any axis. + +\ **Note:** The rotation axis and the forward vector shouldn't be colinear to avoid unintended rotation since :ref:`ChainIK3D` does not factor in twisting forces. + +.. rst-class:: classref-item-separator + +---- + +.. _class_IterateIK3D_method_set_joint_rotation_axis_vector: + +.. rst-class:: classref-method + +|void| **set_joint_rotation_axis_vector**\ (\ index\: :ref:`int`, joint\: :ref:`int`, axis_vector\: :ref:`Vector3`\ ) :ref:`🔗` + +Sets the rotation axis vector for the specified joint in the bone chain. + +This vector is normalized by an internal process and represents the axis around which the bone chain can rotate. + +If the vector length is ``0``, it is considered synonymous with :ref:`SkeletonModifier3D.ROTATION_AXIS_ALL`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_IterateIK3D_method_set_target_node: + +.. rst-class:: classref-method + +|void| **set_target_node**\ (\ index\: :ref:`int`, target_node\: :ref:`NodePath`\ ) :ref:`🔗` + +Sets the target node that the end bone is trying to reach. + +.. |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.)` diff --git a/classes/class_jacobianik3d.rst b/classes/class_jacobianik3d.rst new file mode 100644 index 00000000000..56d6e095003 --- /dev/null +++ b/classes/class_jacobianik3d.rst @@ -0,0 +1,36 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Redot engine sources. +.. Generator: https://github.com/Redot-Engine/redot-engine/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/Redot-Engine/redot-engine/tree/master/doc/classes/JacobianIK3D.xml. + +.. _class_JacobianIK3D: + +JacobianIK3D +============ + +**Inherits:** :ref:`IterateIK3D` **<** :ref:`ChainIK3D` **<** :ref:`IKModifier3D` **<** :ref:`SkeletonModifier3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` + +Jacobian transpose based inverse kinematics solver. + +.. rst-class:: classref-introduction-group + +Description +----------- + +**JacobianIK3D** calculates rotations for all joints simultaneously, producing natural and smooth movement. It is particularly suited for biological animations. + +The resulting twist around the forward vector will always be kept from the previous pose. + +\ **Note:** It converges more slowly than other IK solvers, leading to gentler and less immediate tracking of targets. + +.. |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.)` diff --git a/classes/class_jointlimitation3d.rst b/classes/class_jointlimitation3d.rst new file mode 100644 index 00000000000..7fba70ecb6e --- /dev/null +++ b/classes/class_jointlimitation3d.rst @@ -0,0 +1,34 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Redot engine sources. +.. Generator: https://github.com/Redot-Engine/redot-engine/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/Redot-Engine/redot-engine/tree/master/doc/classes/JointLimitation3D.xml. + +.. _class_JointLimitation3D: + +JointLimitation3D +================= + +**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` + +**Inherited By:** :ref:`JointLimitationCone3D` + +A base class of the limitation that interacts with :ref:`ChainIK3D`. + +.. rst-class:: classref-introduction-group + +Description +----------- + +The limitation is attached to each joint and limits the rotation of the bone. + +.. |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.)` diff --git a/classes/class_jointlimitationcone3d.rst b/classes/class_jointlimitationcone3d.rst new file mode 100644 index 00000000000..e9a40c68652 --- /dev/null +++ b/classes/class_jointlimitationcone3d.rst @@ -0,0 +1,68 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Redot engine sources. +.. Generator: https://github.com/Redot-Engine/redot-engine/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/Redot-Engine/redot-engine/tree/master/doc/classes/JointLimitationCone3D.xml. + +.. _class_JointLimitationCone3D: + +JointLimitationCone3D +===================== + +**Inherits:** :ref:`JointLimitation3D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` + +A cone shape limitation that interacts with :ref:`ChainIK3D`. + +.. rst-class:: classref-introduction-group + +Description +----------- + +A cone shape limitation that interacts with :ref:`ChainIK3D`. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +---------------------------+----------------------------------------------------------+---------------+ + | :ref:`float` | :ref:`angle` | ``1.5707964`` | + +---------------------------+----------------------------------------------------------+---------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_JointLimitationCone3D_property_angle: + +.. rst-class:: classref-property + +:ref:`float` **angle** = ``1.5707964`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_angle**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_angle**\ (\ ) + +The radius range of the hole made by the cone. + +\ ``0`` degrees makes a sphere without hole, ``180`` degrees makes a hemisphere, and ``360`` degrees become empty (no limitation). + +.. |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.)` diff --git a/classes/class_lightmapgi.rst b/classes/class_lightmapgi.rst index 5ede1a8c3ff..816bb21d080 100644 --- a/classes/class_lightmapgi.rst +++ b/classes/class_lightmapgi.rst @@ -94,6 +94,18 @@ Properties | :ref:`bool` | :ref:`use_texture_for_bounces` | ``true`` | +-----------------------------------------------------------+---------------------------------------------------------------------------------------+-----------------------+ +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +---------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`BakeError` | :ref:`bake`\ (\ from_node\: :ref:`Node`, image_data_path\: :ref:`String` = ""\ ) | + +---------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + .. rst-class:: classref-section-separator ---- @@ -748,6 +760,27 @@ If ``true``, a texture with the lighting information will be generated to speed \ **Note:** :ref:`use_texture_for_bounces` only has an effect if :ref:`bounces` is set to a value greater than or equal to ``1``. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_LightmapGI_method_bake: + +.. rst-class:: classref-method + +:ref:`BakeError` **bake**\ (\ from_node\: :ref:`Node`, image_data_path\: :ref:`String` = ""\ ) :ref:`🔗` + +Bakes lightmaps (requires meshes to have UV2 unwrapped) for ``from_node`` and its children to ``image_data_path``. ``image_data_path`` must end with an ``.exr`` or ``.lmbake`` file extension. If ``from_node`` is ``null``, lightmaps are baked from the **LightmapGI** node's parent. Baking lightmaps can take from a few seconds to several dozen minutes depending on the GPU speed and quality settings chosen. + +\ **Note:** :ref:`bake()` only works within the editor, and when running a project from the editor. :ref:`bake()` will do nothing when called in a project exported in either debug or release mode. This limitation is in place to reduce the binary size of exported projects. You can :doc:`compile custom export templates <../contributing/development/compiling/index>` with the ``module_lightmapper_rd_enabled=yes module_xatlas_unwrap_enabled=yes`` SCons options to remove this limitation. + +\ **Additional Note:** Baking lightmaps from a headless editor instance is not supported. If you attempt to bake lightmaps in this manner, baking will fail. + .. |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.)` diff --git a/classes/class_limitangularvelocitymodifier3d.rst b/classes/class_limitangularvelocitymodifier3d.rst new file mode 100644 index 00000000000..e4f9aa7ef3d --- /dev/null +++ b/classes/class_limitangularvelocitymodifier3d.rst @@ -0,0 +1,279 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Redot engine sources. +.. Generator: https://github.com/Redot-Engine/redot-engine/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/Redot-Engine/redot-engine/tree/master/doc/classes/LimitAngularVelocityModifier3D.xml. + +.. _class_LimitAngularVelocityModifier3D: + +LimitAngularVelocityModifier3D +============================== + +**Inherits:** :ref:`SkeletonModifier3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` + +Limit bone rotation angular velocity. + +.. rst-class:: classref-introduction-group + +Description +----------- + +This modifier limits bone rotation angular velocity by comparing poses between previous and current frame. + +You can add bone chains by specifying their root and end bones, then add the bones between them to a list. Modifier processes either that list or the bones excluding those in the list depending on the option :ref:`exclude`. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +---------------------------+-------------------------------------------------------------------------------------------------+---------------+ + | :ref:`int` | :ref:`chain_count` | ``0`` | + +---------------------------+-------------------------------------------------------------------------------------------------+---------------+ + | :ref:`bool` | :ref:`exclude` | ``false`` | + +---------------------------+-------------------------------------------------------------------------------------------------+---------------+ + | :ref:`int` | :ref:`joint_count` | ``0`` | + +---------------------------+-------------------------------------------------------------------------------------------------+---------------+ + | :ref:`float` | :ref:`max_angular_velocity` | ``6.2831855`` | + +---------------------------+-------------------------------------------------------------------------------------------------+---------------+ + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_chains`\ (\ ) | + +-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_end_bone`\ (\ index\: :ref:`int`\ ) |const| | + +-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_end_bone_name`\ (\ index\: :ref:`int`\ ) |const| | + +-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_root_bone`\ (\ index\: :ref:`int`\ ) |const| | + +-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_root_bone_name`\ (\ index\: :ref:`int`\ ) |const| | + +-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`reset`\ (\ ) | + +-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_end_bone`\ (\ index\: :ref:`int`, bone\: :ref:`int`\ ) | + +-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_end_bone_name`\ (\ index\: :ref:`int`, bone_name\: :ref:`String`\ ) | + +-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_root_bone`\ (\ index\: :ref:`int`, bone\: :ref:`int`\ ) | + +-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_root_bone_name`\ (\ index\: :ref:`int`, bone_name\: :ref:`String`\ ) | + +-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_LimitAngularVelocityModifier3D_property_chain_count: + +.. rst-class:: classref-property + +:ref:`int` **chain_count** = ``0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_chain_count**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_chain_count**\ (\ ) + +The number of chains. + +.. rst-class:: classref-item-separator + +---- + +.. _class_LimitAngularVelocityModifier3D_property_exclude: + +.. rst-class:: classref-property + +:ref:`bool` **exclude** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_exclude**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_exclude**\ (\ ) + +If ``true``, the modifier processes bones not included in the bone list. + +If ``false``, the bones processed by the modifier are equal to the bone list. + +.. rst-class:: classref-item-separator + +---- + +.. _class_LimitAngularVelocityModifier3D_property_joint_count: + +.. rst-class:: classref-property + +:ref:`int` **joint_count** = ``0`` :ref:`🔗` + +The number of joints in the list which created by chains dynamically. + +.. rst-class:: classref-item-separator + +---- + +.. _class_LimitAngularVelocityModifier3D_property_max_angular_velocity: + +.. rst-class:: classref-property + +:ref:`float` **max_angular_velocity** = ``6.2831855`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_max_angular_velocity**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_max_angular_velocity**\ (\ ) + +The maximum angular velocity per second. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_LimitAngularVelocityModifier3D_method_clear_chains: + +.. rst-class:: classref-method + +|void| **clear_chains**\ (\ ) :ref:`🔗` + +Clear all chains. + +.. rst-class:: classref-item-separator + +---- + +.. _class_LimitAngularVelocityModifier3D_method_get_end_bone: + +.. rst-class:: classref-method + +:ref:`int` **get_end_bone**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the end bone index of the bone chain. + +.. rst-class:: classref-item-separator + +---- + +.. _class_LimitAngularVelocityModifier3D_method_get_end_bone_name: + +.. rst-class:: classref-method + +:ref:`String` **get_end_bone_name**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the end bone name of the bone chain. + +.. rst-class:: classref-item-separator + +---- + +.. _class_LimitAngularVelocityModifier3D_method_get_root_bone: + +.. rst-class:: classref-method + +:ref:`int` **get_root_bone**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the root bone index of the bone chain. + +.. rst-class:: classref-item-separator + +---- + +.. _class_LimitAngularVelocityModifier3D_method_get_root_bone_name: + +.. rst-class:: classref-method + +:ref:`String` **get_root_bone_name**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the root bone name of the bone chain. + +.. rst-class:: classref-item-separator + +---- + +.. _class_LimitAngularVelocityModifier3D_method_reset: + +.. rst-class:: classref-method + +|void| **reset**\ (\ ) :ref:`🔗` + +Sets the reference pose for angle comparison to the current pose with the influence of constraints removed. This function is automatically triggered when joints change or upon activation. + +.. rst-class:: classref-item-separator + +---- + +.. _class_LimitAngularVelocityModifier3D_method_set_end_bone: + +.. rst-class:: classref-method + +|void| **set_end_bone**\ (\ index\: :ref:`int`, bone\: :ref:`int`\ ) :ref:`🔗` + +Sets the end bone index of the bone chain. + +.. rst-class:: classref-item-separator + +---- + +.. _class_LimitAngularVelocityModifier3D_method_set_end_bone_name: + +.. rst-class:: classref-method + +|void| **set_end_bone_name**\ (\ index\: :ref:`int`, bone_name\: :ref:`String`\ ) :ref:`🔗` + +Sets the end bone name of the bone chain. + +\ **Note:** End bone must be the root bone or a child of the root bone. + +.. rst-class:: classref-item-separator + +---- + +.. _class_LimitAngularVelocityModifier3D_method_set_root_bone: + +.. rst-class:: classref-method + +|void| **set_root_bone**\ (\ index\: :ref:`int`, bone\: :ref:`int`\ ) :ref:`🔗` + +Sets the root bone index of the bone chain. + +.. rst-class:: classref-item-separator + +---- + +.. _class_LimitAngularVelocityModifier3D_method_set_root_bone_name: + +.. rst-class:: classref-method + +|void| **set_root_bone_name**\ (\ index\: :ref:`int`, bone_name\: :ref:`String`\ ) :ref:`🔗` + +Sets the root bone name of the bone chain. + +.. |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.)` diff --git a/classes/class_lookatmodifier3d.rst b/classes/class_lookatmodifier3d.rst index 12c02153490..e494f703b44 100644 --- a/classes/class_lookatmodifier3d.rst +++ b/classes/class_lookatmodifier3d.rst @@ -68,6 +68,8 @@ Properties +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+ | :ref:`Axis` | :ref:`primary_rotation_axis` | ``1`` | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+ + | :ref:`bool` | :ref:`relative` | ``true`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+ | :ref:`float` | :ref:`secondary_damp_threshold` | | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+ | :ref:`float` | :ref:`secondary_limit_angle` | | @@ -475,6 +477,23 @@ The axis of the first rotation. This :ref:`SkeletonModifier3D` **relative** = ``true`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_relative**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_relative**\ (\ ) + +The relative option. If ``true``, the rotation is applied relative to the pose. If ``false``, the rotation is applied relative to the rest. It means to replace the current pose with the **LookAtModifier3D**'s result. + +.. rst-class:: classref-item-separator + +---- + .. _class_LookAtModifier3D_property_secondary_damp_threshold: .. rst-class:: classref-property diff --git a/classes/class_mcpbridge.rst b/classes/class_mcpbridge.rst index cb7042420c5..a0494754fd0 100644 --- a/classes/class_mcpbridge.rst +++ b/classes/class_mcpbridge.rst @@ -12,9 +12,14 @@ MCPBridge **Inherits:** :ref:`Object` -.. container:: contribute +TCP bridge relaying commands between the MCP server and a running game process. - There is currently no description for this class. Please help us by `contributing one `__! +.. rst-class:: classref-introduction-group + +Description +----------- + +**MCPBridge** is a bidirectional TCP relay. On the server (headless) side it listens on an ephemeral loopback port and sends commands produced by MCP tools. On the game side (started with the ``--mcp-bridge-port`` flag) it connects back to that port, receives commands, executes them against the live scene tree/viewport, and returns results. The bridge is single-connection and automatically replaces a stale peer when a new game process connects. .. rst-class:: classref-reftable-group @@ -43,9 +48,7 @@ Method Descriptions |void| **update**\ (\ ) :ref:`🔗` -.. container:: contribute - - There is currently no description for this method. Please help us by `contributing one `__! +Pumps the bridge: on the host side it accepts pending connections; on the game side it reads incoming commands, dispatches them, and writes responses. Called each frame from the main loop (game side) or the server's bridge thread (host side). .. |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.)` diff --git a/classes/class_mcpprotocol.rst b/classes/class_mcpprotocol.rst index cef0208957d..78177f4a333 100644 --- a/classes/class_mcpprotocol.rst +++ b/classes/class_mcpprotocol.rst @@ -12,9 +12,14 @@ MCPProtocol **Inherits:** :ref:`JSONRPC` **<** :ref:`Object` -.. container:: contribute +MCP JSON-RPC protocol handler: capability negotiation, tool listing, and dispatch. - There is currently no description for this class. Please help us by `contributing one `__! +.. rst-class:: classref-introduction-group + +Description +----------- + +Implements the Model Context Protocol request layer on top of the JSONRPC class. Handles the ``initialize`` handshake with version negotiation, the ``notifications/initialized`` lifecycle event, ``ping``, ``tools/list``, and ``tools/call``. Tool execution is delegated to the internal MCPTools class. The operation phase is gated until the ``initialized`` notification is received, per spec. .. rst-class:: classref-reftable-group @@ -43,9 +48,7 @@ Method Descriptions :ref:`bool` **is_initialized**\ (\ ) |const| :ref:`🔗` -.. container:: contribute - - There is currently no description for this method. Please help us by `contributing one `__! +Returns ``true`` after the client has sent the ``notifications/initialized`` handshake message, marking the start of the operation phase. .. |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.)` diff --git a/classes/class_mcpserver.rst b/classes/class_mcpserver.rst index 6b30cb71724..6668cf9809d 100644 --- a/classes/class_mcpserver.rst +++ b/classes/class_mcpserver.rst @@ -12,9 +12,14 @@ MCPServer **Inherits:** :ref:`Object` -.. container:: contribute +Stdio-based MCP (Model Context Protocol) server for AI agent integration. - There is currently no description for this class. Please help us by `contributing one `__! +.. rst-class:: classref-introduction-group + +Description +----------- + +The MCP server exposes the running Redot project to AI coding assistants over a JSON-RPC stdio transport. It is started with the ``--mcp-server`` command-line flag, which implies headless mode. The server reads newline-delimited JSON-RPC requests on stdin and writes responses to stdout. A TCP bridge (:ref:`MCPBridge`) is used to forward tool calls (screenshots, input, tree inspection) to a separately launched game process. See `the MCP specification `__ for protocol details. .. rst-class:: classref-reftable-group @@ -47,9 +52,7 @@ Method Descriptions :ref:`bool` **is_running**\ (\ ) |const| :ref:`🔗` -.. container:: contribute - - There is currently no description for this method. Please help us by `contributing one `__! +Returns ``true`` while the server loop is processing requests. .. rst-class:: classref-item-separator @@ -61,9 +64,7 @@ Method Descriptions |void| **start**\ (\ ) :ref:`🔗` -.. container:: contribute - - There is currently no description for this method. Please help us by `contributing one `__! +Starts the blocking server loop. Reads requests from stdin and dispatches them to the registered protocol handlers. Returns when the input stream is closed or :ref:`stop()` is requested. .. rst-class:: classref-item-separator @@ -75,9 +76,7 @@ Method Descriptions |void| **stop**\ (\ ) :ref:`🔗` -.. container:: contribute - - There is currently no description for this method. Please help us by `contributing one `__! +Signals the server loop to stop and wakes the stdin poll. .. |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.)` diff --git a/classes/class_meshinstance3d.rst b/classes/class_meshinstance3d.rst index ca0903adcff..87f61074cc1 100644 --- a/classes/class_meshinstance3d.rst +++ b/classes/class_meshinstance3d.rst @@ -87,6 +87,10 @@ Methods +-------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_surface_override_material_count`\ (\ ) |const| | +-------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`intersect_ray`\ (\ origin\: :ref:`Vector3`, dir\: :ref:`Vector3`, include_uv\: :ref:`bool` = false\ ) |const| | + +-------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`intersect_segment`\ (\ from\: :ref:`Vector3`, to\: :ref:`Vector3`, include_uv\: :ref:`bool` = false\ ) |const| | + +-------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_blend_shape_value`\ (\ blend_shape_idx\: :ref:`int`, value\: :ref:`float`\ ) | +-------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_surface_override_material`\ (\ surface\: :ref:`int`, material\: :ref:`Material`\ ) | @@ -325,6 +329,46 @@ Returns the number of surface override materials. This is equivalent to :ref:`Me ---- +.. _class_MeshInstance3D_method_intersect_ray: + +.. rst-class:: classref-method + +:ref:`Dictionary` **intersect_ray**\ (\ origin\: :ref:`Vector3`, dir\: :ref:`Vector3`, include_uv\: :ref:`bool` = false\ ) |const| :ref:`🔗` + +Performs a ray intersection test against the visual mesh. + +Returns a :ref:`Dictionary` with the following keys: ``success``, ``position``, ``normal``, ``surface_index``, ``face_index``, and ``material``. + +The keys ``surface_index`` and ``face_index`` are indices into their respective mesh data, ``position`` and ``normal`` returns the position the mesh was intersected at and the normal of the intersected face, and ``material`` is the material of the intersected face. + +If ``include_uv`` is ``true``, then the UV and UV2 of the face at the intersected point is calculated and returned as the keys ``uv`` and ``uv2``. + +If the key ``success`` is true, then the ray intersected the mesh. + +.. rst-class:: classref-item-separator + +---- + +.. _class_MeshInstance3D_method_intersect_segment: + +.. rst-class:: classref-method + +:ref:`Dictionary` **intersect_segment**\ (\ from\: :ref:`Vector3`, to\: :ref:`Vector3`, include_uv\: :ref:`bool` = false\ ) |const| :ref:`🔗` + +Performs a line segment intersection test against the visual mesh. + +Returns a :ref:`Dictionary` with the following keys: ``success``, ``position``, ``normal``, ``surface_index``, ``face_index``, and ``material``. + +The keys ``surface_index`` and ``face_index`` are indices into their respective mesh data, ``position`` and ``normal`` returns the position the mesh was intersected at and the normal of the intersected face, and ``material`` is the material of the intersected face. + +If ``include_uv`` is ``true``, then the UV and UV2 of the face at the intersected point is calculated and returned as the keys ``uv`` and ``uv2``. + +If the key ``success`` is true, then the segment intersected the mesh. + +.. rst-class:: classref-item-separator + +---- + .. _class_MeshInstance3D_method_set_blend_shape_value: .. rst-class:: classref-method diff --git a/classes/class_mode7scanlineoverride.rst b/classes/class_mode7scanlineoverride.rst new file mode 100644 index 00000000000..6e1894e21dd --- /dev/null +++ b/classes/class_mode7scanlineoverride.rst @@ -0,0 +1,185 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Redot engine sources. +.. Generator: https://github.com/Redot-Engine/redot-engine/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/Redot-Engine/redot-engine/tree/master/doc/classes/Mode7ScanlineOverride.xml. + +.. _class_Mode7ScanlineOverride: + +Mode7ScanlineOverride +===================== + +**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` + +A resource that holds per-scanline transform data for Mode 7 perspective rendering. + +.. rst-class:: classref-introduction-group + +Description +----------- + +A :ref:`Resource` used by :ref:`Mode7Sprite2D` to store one entry in the per-scanline "scanline table" that drives Mode 7-style perspective and rotation effects. + + + +The Super Nintendo was able to apply a different transformation to each scanline (output row), enabling perspective projection effects like the distant ground plane in racing games. This class exposes that capability through intuitive properties: a 2x2 affine matrix (rotation, scale, skew), a pivot point, and optional color modulation. + + + +\ **Interpolation modes** determine how adjacent entries in the override array are blended: + +- **None:** Nearest-neighbor snap — each row uses exactly this entry's transform with no blending between rows. Best for scripted or fully manual transformations where every scanline is set individually. + +- **Lerp:** Linear interpolation between adjacent entries in the override array. The shader smoothly blends transforms, pivots, and modulate colors across all intervening scanlines. Add any number of overrides to create gradual transitions. + +- **Projection:** Perspective projection via per-scanline inverse-depth interpolation. Uses the first entry (index 0) as the top/horizon anchor and the last entry as the bottom/close anchor. Designed specifically for use with exactly 2 overrides — one at the horizon line and one closer to the camera. + + + +The transforms are stored canonically as a :ref:`Transform2D`, but you can also read/write decomposed rotation, scale, and skew properties for convenience. Values below ``0.00001`` are clamped internally to prevent division-by-zero artifacts during inverse-depth interpolation. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +---------------------------------------+------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`modulate` | ``Color(1, 1, 1, 1)`` | + +---------------------------------------+------------------------------------------------------------------+-----------------------------------+ + | :ref:`Vector2` | :ref:`pivot` | ``Vector2(0.5, 0.5)`` | + +---------------------------------------+------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`rotation` | ``0.0`` | + +---------------------------------------+------------------------------------------------------------------+-----------------------------------+ + | :ref:`Vector2` | :ref:`scale` | ``Vector2(1, 1)`` | + +---------------------------------------+------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`skew` | ``0.0`` | + +---------------------------------------+------------------------------------------------------------------+-----------------------------------+ + | :ref:`Transform2D` | :ref:`transform` | ``Transform2D(1, 0, 0, 1, 0, 0)`` | + +---------------------------------------+------------------------------------------------------------------+-----------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_Mode7ScanlineOverride_property_modulate: + +.. rst-class:: classref-property + +:ref:`Color` **modulate** = ``Color(1, 1, 1, 1)`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_modulate**\ (\ value\: :ref:`Color`\ ) +- :ref:`Color` **get_modulate**\ (\ ) + +Per-scanline color tint and alpha/intensity. The shader lerps this between adjacent overrides (just like the transform), enabling gradual fade-to-black into the distance for depth, bloom glow effects, or any per-band color correction. Fully supports RGBA — set alpha to blend the sprite transparently at specific scanline ranges. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Mode7ScanlineOverride_property_pivot: + +.. rst-class:: classref-property + +:ref:`Vector2` **pivot** = ``Vector2(0.5, 0.5)`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_pivot**\ (\ value\: :ref:`Vector2`\ ) +- :ref:`Vector2` **get_pivot**\ (\ ) + +The vanishing point in normalized \[0..1\] texture UV space around which the transform is applied. Defaults to center (``(0.5, 0.5)``). Set closer to an edge to make that edge appear nearer or farther in perspective mode. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Mode7ScanlineOverride_property_rotation: + +.. rst-class:: classref-property + +:ref:`float` **rotation** = ``0.0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_rotation**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_rotation**\ (\ ) + +Rotation angle in degrees, decomposed from :ref:`transform`. Provides a more intuitive interface than editing matrix columns directly for simple rotational adjustments. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Mode7ScanlineOverride_property_scale: + +.. rst-class:: classref-property + +:ref:`Vector2` **scale** = ``Vector2(1, 1)`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_scale**\ (\ value\: :ref:`Vector2`\ ) +- :ref:`Vector2` **get_scale**\ (\ ) + +Scale factor applied along the X and Y axes, decomposed from :ref:`transform`. Values below 0.00001. are clamped internally to prevent division-by-zero artifacts during inverse-depth (Projection) interpolation. Adjust scale to zoom in or out on the Mode 7 plane — smaller values bring the horizon closer. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Mode7ScanlineOverride_property_skew: + +.. rst-class:: classref-property + +:ref:`float` **skew** = ``0.0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_skew**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_skew**\ (\ ) + +Skew angle in degrees, decomposed from :ref:`transform`. Tilts the coordinate grid into a shear transformation. Useful for simulating uneven terrain or angled surfaces. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Mode7ScanlineOverride_property_transform: + +.. rst-class:: classref-property + +:ref:`Transform2D` **transform** = ``Transform2D(1, 0, 0, 1, 0, 0)`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_transform**\ (\ value\: :ref:`Transform2D`\ ) +- :ref:`Transform2D` **get_transform**\ (\ ) + +The canonical transformation matrix stored as two column vectors plus a translation offset: ``(col0_x, col1_x, off_x), (col0_y, col1_y, off_y)``. + +\ **Column 0 and Column 1** form the 2x2 affine matrix controlling rotation and scale. Adjust these to rotate or stretch the background plane. + +\ **Skew** — changing the off-diagonal elements tilts the coordinate grid into a shear. + +\ **Translation offset (x0, y0)** shifts where the Mode 7 plane appears on screen, analogous to moving the camera position. + +.. |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.)` diff --git a/classes/class_mode7sprite2d.rst b/classes/class_mode7sprite2d.rst new file mode 100644 index 00000000000..24ff1f733f7 --- /dev/null +++ b/classes/class_mode7sprite2d.rst @@ -0,0 +1,498 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Redot engine sources. +.. Generator: https://github.com/Redot-Engine/redot-engine/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/Redot-Engine/redot-engine/tree/master/doc/classes/Mode7Sprite2D.xml. + +.. _class_Mode7Sprite2D: + +Mode7Sprite2D +============= + +**Inherits:** :ref:`Sprite2D` **<** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` + +Extends Sprite2D to offer SNES Mode 7-style affine transformations per scanline. + +.. rst-class:: classref-introduction-group + +Description +----------- + +This class extends :ref:`Sprite2D` to replicate the Super Nintendo's Mode 7 graphics capabilities, which allowed affine transformations to be controlled per scanline. + +This enabled the iconic perspective projection effect used in games like `Super Mario World `__ and `F-Zero `__. + + + +"Scanlines" were just how old televisions drew images - horizontal lines from the top down. The term is used in this class in deference to the Super Nintendo + +behavior it's designed to reproduce, but in modern parlance a UV.y "band" is what this loosely equates to. + +The "per-scanline" effect is driven by an array of :ref:`Mode7ScanlineOverride` resources (:ref:`mode7_scanline_overrides`), each encoding a 2x2 affine matrix (rotation, scale, skew), a translation offset, + +and a pivot point for one horizontal band of the output. The shader interpolates between adjacent entries per-scanline using None, Lerp, or Projection modes. + +Most of the time, you'll want Lerp or Projection. These interpolate between the values you set in each scanline override object in the array. + +This is the mechanism by which it's not necessary to specify each individual scanline :). + + + +Global rotation, pivot, and offset are applied after all per-scanline transforms. + +Horizon masks cull transparent regions at the top or bottom of the sprite with optional tilt angles, matching an aircraft attitude indicator. + +A region follow target lets the Mode 7 viewport track another :ref:`Node2D` each physics frame. This can be set in code, but moving an object and having the + +viewing area "follow" that object, is a useful convenience. + + + +\ **How it works:** One **Mode7Sprite2D** instance replaces the standard Sprite2D material with a custom canvas_item shader. + +The shader reads per-scanline transforms from a 3-pixel-wide texture (transform matrix, offset/pivot, and modulate). + +This approach allows intuitive property-based control while maintaining GPU-efficient per-fragment execution. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`mode7_bottom_horizon_mask_amount` | ``0.0`` | + +----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`mode7_bottom_horizon_tilt` | ``0.0`` | + +----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`mode7_enabled` | ``false`` | + +----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Vector2` | :ref:`mode7_global_offset` | ``Vector2(0, 0)`` | + +----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Vector2` | :ref:`mode7_global_pivot` | ``Vector2(0.5, 0.5)`` | + +----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`mode7_global_rotation` | ``0.0`` | + +----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Mode7InterpolationMode` | :ref:`mode7_interpolation` | ``0`` | + +----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`mode7_override_region_aspect` | ``true`` | + +----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`mode7_projection_aspect_ratio` | ``1.0`` | + +----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`mode7_projection_gamma` | ``1.0`` | + +----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`mode7_projection_pixel_aspect` | ``1.0`` | + +----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`mode7_projection_strength` | ``1.0`` | + +----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`NodePath` | :ref:`mode7_region_follow_target` | ``NodePath("")`` | + +----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Array`\[:ref:`Mode7ScanlineOverride`\] | :ref:`mode7_scanline_overrides` | ``[]`` | + +----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`mode7_tiling` | ``false`` | + +----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`mode7_top_horizon_mask_amount` | ``0.0`` | + +----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`mode7_top_horizon_tilt` | ``0.0`` | + +----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+-----------------------+ + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +--------+----------------------------------------------------------------------------------------------+ + | |void| | :ref:`force_update_follow_cache`\ (\ ) | + +--------+----------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Enumerations +------------ + +.. _enum_Mode7Sprite2D_Mode7InterpolationMode: + +.. rst-class:: classref-enumeration + +enum **Mode7InterpolationMode**: :ref:`🔗` + +.. _class_Mode7Sprite2D_constant_INTERPOLATION_NONE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Mode7InterpolationMode` **INTERPOLATION_NONE** = ``0`` + +Nearest-neighbor: snap to this entry's transform for its UV band with no blending between rows. You typically only want this mode if you're scripting transformations for every scanline individually. For most cases, :ref:`INTERPOLATION_LERP` or :ref:`INTERPOLATION_PROJECTION` provides simpler and more intuitive control. + +.. _class_Mode7Sprite2D_constant_INTERPOLATION_LERP: + +.. rst-class:: classref-enumeration-constant + +:ref:`Mode7InterpolationMode` **INTERPOLATION_LERP** = ``1`` + +Linear interpolation between adjacent entries in the override array. The shader uses standard lerping to blend transforms, pivots, and modulate colors across all intervening scanlines, creating smooth transitions regardless of how many overrides are in the array. Ideal for gradual effects like distance fog or terrain slope changes. + +.. _class_Mode7Sprite2D_constant_INTERPOLATION_PROJECTION: + +.. rst-class:: classref-enumeration-constant + +:ref:`Mode7InterpolationMode` **INTERPOLATION_PROJECTION** = ``2`` + +Perspective projection via per-scanline inverse-depth interpolation. Uses the first entry (index 0) as the top/horizon anchor and the last entry as the bottom/close anchor, mimicking how the SNES hardware projected a 3D plane onto the 2D screen. This mode requires exactly 2 scanline overrides in the array for correct behavior — additional entries are ignored. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_Mode7Sprite2D_property_mode7_bottom_horizon_mask_amount: + +.. rst-class:: classref-property + +:ref:`float` **mode7_bottom_horizon_mask_amount** = ``0.0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_mode7_bottom_horizon_mask_amount**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_mode7_bottom_horizon_mask_amount**\ (\ ) + +Fraction (0..1) of the sprite to make transparent from the bottom up. 0 means no masking visible; 1 hides the entire sprite. Works independently of the top mask — both can be active simultaneously. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Mode7Sprite2D_property_mode7_bottom_horizon_tilt: + +.. rst-class:: classref-property + +:ref:`float` **mode7_bottom_horizon_tilt** = ``0.0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_mode7_bottom_horizon_tilt**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_mode7_bottom_horizon_tilt**\ (\ ) + +Tilt angle in degrees that rotates the bottom horizon line around the center like an aircraft attitude indicator. Positive values tilt clockwise (right side drops). Independent of :ref:`mode7_bottom_horizon_mask_amount` — always active and influences the horizon angle regardless of masking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Mode7Sprite2D_property_mode7_enabled: + +.. rst-class:: classref-property + +:ref:`bool` **mode7_enabled** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_mode7_enabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_mode7_enabled**\ (\ ) + +Enable or disable Mode 7 shader effects. When ``false``, the sprite renders normally with no overhead from the custom material. + +Acts as a master toggle — all other ``mode7_`` properties only take effect when this is ``true``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Mode7Sprite2D_property_mode7_global_offset: + +.. rst-class:: classref-property + +:ref:`Vector2` **mode7_global_offset** = ``Vector2(0, 0)`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_mode7_global_offset**\ (\ value\: :ref:`Vector2`\ ) +- :ref:`Vector2` **get_mode7_global_offset**\ (\ ) + +Additive offset applied after all per-scanline transforms and global rotation. The offset is rotated by the same angle so it shifts in the global (screen) frame rather than the warped UV frame, giving a uniform screen-space translation regardless of per-scanline scaling. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Mode7Sprite2D_property_mode7_global_pivot: + +.. rst-class:: classref-property + +:ref:`Vector2` **mode7_global_pivot** = ``Vector2(0.5, 0.5)`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_mode7_global_pivot**\ (\ value\: :ref:`Vector2`\ ) +- :ref:`Vector2` **get_mode7_global_pivot**\ (\ ) + +Pivot point in normalized \[0..1\] UV space around which :ref:`mode7_global_rotation` is applied. Defaults to center of the texture. Used for both global rotation and per-scanline transform anchoring. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Mode7Sprite2D_property_mode7_global_rotation: + +.. rst-class:: classref-property + +:ref:`float` **mode7_global_rotation** = ``0.0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_mode7_global_rotation**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_mode7_global_rotation**\ (\ ) + +Global rotation angle in degrees, applied after all per-scanline transforms. Rotates the entire warped image around :ref:`mode7_global_pivot`. + +Valid range is -360 to 360 degrees. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Mode7Sprite2D_property_mode7_interpolation: + +.. rst-class:: classref-property + +:ref:`Mode7InterpolationMode` **mode7_interpolation** = ``0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_mode7_interpolation**\ (\ value\: :ref:`Mode7InterpolationMode`\ ) +- :ref:`Mode7InterpolationMode` **get_mode7_interpolation**\ (\ ) + +Determines how the shader blends the elements in the scanline override array across the sprite height. Choose based on your effect: :ref:`INTERPOLATION_NONE` for per-scanline precision, :ref:`INTERPOLATION_LERP` for smooth transitions between any number of overrides, or :ref:`INTERPOLATION_PROJECTION` for perspective with exactly 2 entries. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Mode7Sprite2D_property_mode7_override_region_aspect: + +.. rst-class:: classref-property + +:ref:`bool` **mode7_override_region_aspect** = ``true`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_mode7_override_region_aspect**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_mode7_override_region_aspect**\ (\ ) + +When ``true`` (default), non-square region rects have their rotations corrected to behave as if the region were square. This prevents rotations from skewing into shears when using a cropped region. Set to ``false`` if you want raw, uncorrected UV behavior for creative warping effects. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Mode7Sprite2D_property_mode7_projection_aspect_ratio: + +.. rst-class:: classref-property + +:ref:`float` **mode7_projection_aspect_ratio** = ``1.0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_mode7_projection_aspect_ratio**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_mode7_projection_aspect_ratio**\ (\ ) + +Horizontal-to-vertical scale ratio for the perspective. 1.0 is uniform (classic Mode 7). + +0.5 makes the horizontal scale half the vertical; values above 1.0 reverse the imbalance. + +Useful for compensating non-square source art. Only applies in Projection interpolation mode. Recommended: 0.5–1.5, default 1.0. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Mode7Sprite2D_property_mode7_projection_gamma: + +.. rst-class:: classref-property + +:ref:`float` **mode7_projection_gamma** = ``1.0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_mode7_projection_gamma**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_mode7_projection_gamma**\ (\ ) + +Gamma/power exponent for the inverse-depth curve. 1.0 is the classic linear 1/d progression. + +Values below 1.0 soften the falloff so distant scanlines keep more perspective influence; + +values above 1.0 sharpen it so the aggressive warp concentrates near the close anchor. + +Only applies in Projection interpolation mode. Recommended: 0.5–2.0, default 1.0. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Mode7Sprite2D_property_mode7_projection_pixel_aspect: + +.. rst-class:: classref-property + +:ref:`float` **mode7_projection_pixel_aspect** = ``1.0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_mode7_projection_pixel_aspect**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_mode7_projection_pixel_aspect**\ (\ ) + +Stretches/compresses the vertical coordinate before the inverse-depth calculation, + +correcting for or exaggerating non-square display pixels (e.g. NTSC 8:7 ≈ 1.125). + +Only applies in Projection interpolation mode. Recommended: 0.875–1.125, default 1.0 (square pixels). + +.. rst-class:: classref-item-separator + +---- + +.. _class_Mode7Sprite2D_property_mode7_projection_strength: + +.. rst-class:: classref-property + +:ref:`float` **mode7_projection_strength** = ``1.0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_mode7_projection_strength**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_mode7_projection_strength**\ (\ ) + +Blends between a flat, unwarped image (0.0) and the full inverse-depth projection (1.0). + +Lets you dial the perspective intensity down without reshaping the curve. + +Only applies in Projection interpolation mode. Recommended: 0.0–1.0, default 1.0. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Mode7Sprite2D_property_mode7_region_follow_target: + +.. rst-class:: classref-property + +:ref:`NodePath` **mode7_region_follow_target** = ``NodePath("")`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_mode7_region_follow_target**\ (\ value\: :ref:`NodePath`\ ) +- :ref:`NodePath` **get_mode7_region_follow_target**\ (\ ) + +Path to a :ref:`Node2D` target. When set, the sprite's :ref:`Sprite2D.region_rect` shifts each physics frame so the Mode 7 viewport "follows" the target node while preserving its size and aspect ratio. + +This creates the illusion of a moving camera or scrolling background. Only active when region mode is enabled on the sprite (:ref:`Sprite2D.region_enabled` must be ``true``). + +.. rst-class:: classref-item-separator + +---- + +.. _class_Mode7Sprite2D_property_mode7_scanline_overrides: + +.. rst-class:: classref-property + +:ref:`Array`\[:ref:`Mode7ScanlineOverride`\] **mode7_scanline_overrides** = ``[]`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_mode7_scanline_overrides**\ (\ value\: :ref:`Array`\[:ref:`Mode7ScanlineOverride`\]\ ) +- :ref:`Array`\[:ref:`Mode7ScanlineOverride`\] **get_mode7_scanline_overrides**\ (\ ) + +Array of :ref:`Mode7ScanlineOverride` resources acting as anchors across the sprite height. Each entry defines a 2x2 affine matrix (rotation, scale, skew), a translation offset, and a pivot point, and the shader interpolates between adjacent entries for every output row (UV.y band). + +When Mode 7 is enabled, a single default identity override is created automatically. Add more entries to interpolate between different transforms across the sprite height. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Mode7Sprite2D_property_mode7_tiling: + +.. rst-class:: classref-property + +:ref:`bool` **mode7_tiling** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_mode7_tiling**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_mode7_tiling**\ (\ ) + +Whether out-of-bounds UV coordinates wrap (repeat) or become transparent. Enable this to make the texture tile seamlessly when the Mode 7 warp pushes UVs outside the \[0..1\] range. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Mode7Sprite2D_property_mode7_top_horizon_mask_amount: + +.. rst-class:: classref-property + +:ref:`float` **mode7_top_horizon_mask_amount** = ``0.0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_mode7_top_horizon_mask_amount**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_mode7_top_horizon_mask_amount**\ (\ ) + +Fraction (0..1) of the sprite to make transparent from the top down. 0 means no masking visible; 1 hides the entire sprite. Works independently of the bottom mask — both can be active simultaneously. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Mode7Sprite2D_property_mode7_top_horizon_tilt: + +.. rst-class:: classref-property + +:ref:`float` **mode7_top_horizon_tilt** = ``0.0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_mode7_top_horizon_tilt**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_mode7_top_horizon_tilt**\ (\ ) + +Tilt angle in degrees that rotates the top horizon line around the center like an aircraft attitude indicator. Positive values tilt clockwise (right side drops). Valid range is -360 to 360 degrees. Independent of :ref:`mode7_top_horizon_mask_amount` — always active and influences the horizon angle regardless of masking. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_Mode7Sprite2D_method_force_update_follow_cache: + +.. rst-class:: classref-method + +|void| **force_update_follow_cache**\ (\ ) :ref:`🔗` + +Re-resolve the follow target from :ref:`mode7_region_follow_target` and store it in the internal follow cache. Useful after a scene reload when you need to refresh the tracked target without waiting for :ref:`Node.NOTIFICATION_ENTER_TREE`. + +.. |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.)` diff --git a/classes/class_node.rst b/classes/class_node.rst index 80a09533798..edd60973905 100644 --- a/classes/class_node.rst +++ b/classes/class_node.rst @@ -1949,7 +1949,7 @@ If ``owned`` is ``true``, only descendants with a valid :ref:`owner` if no match is found. The matching is done against node names, *not* their paths, through :ref:`String.match()`. As such, it is case-sensitive, ``"*"`` matches zero or more characters, and ``"?"`` matches any single character. -If ``type`` is not empty, only ancestors inheriting from ``type`` are included (see :ref:`Object.is_class()`). +If ``type`` is not empty, only descendants inheriting from ``type`` are included (see :ref:`Object.is_class()`). If ``recursive`` is ``false``, only this node's direct children are checked. Nodes are checked in tree order, so this node's first direct child is checked first, then its own direct children, etc., before moving to the second direct child, and so on. Internal children are also included in the search (see ``internal`` parameter in :ref:`add_child()`). diff --git a/classes/class_node3d.rst b/classes/class_node3d.rst index 65d4f13279e..6224b42d16b 100644 --- a/classes/class_node3d.rst +++ b/classes/class_node3d.rst @@ -15,7 +15,7 @@ Node3D **Inherits:** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`AudioListener3D`, :ref:`AudioStreamPlayer3D`, :ref:`BoneAttachment3D`, :ref:`Camera3D`, :ref:`CollisionObject3D`, :ref:`CollisionPolygon3D`, :ref:`CollisionShape3D`, :ref:`GridMap`, :ref:`ImporterMeshInstance3D`, :ref:`Joint3D`, :ref:`LightmapProbe`, :ref:`Marker3D`, :ref:`NavigationLink3D`, :ref:`NavigationObstacle3D`, :ref:`NavigationRegion3D`, :ref:`OpenXRCompositionLayer`, :ref:`OpenXRHand`, :ref:`OpenXRRenderModel`, :ref:`OpenXRRenderModelManager`, :ref:`Path3D`, :ref:`PathFollow3D`, :ref:`RayCast3D`, :ref:`RemoteTransform3D`, :ref:`ShapeCast3D`, :ref:`Skeleton3D`, :ref:`SkeletonModifier3D`, :ref:`SpringArm3D`, :ref:`SpringBoneCollision3D`, :ref:`VehicleWheel3D`, :ref:`VisualInstance3D`, :ref:`XRFaceModifier3D`, :ref:`XRNode3D`, :ref:`XROrigin3D` +**Inherited By:** :ref:`AudioListener3D`, :ref:`AudioStreamPlayer3D`, :ref:`BoneAttachment3D`, :ref:`Camera3D`, :ref:`CollisionObject3D`, :ref:`CollisionPolygon3D`, :ref:`CollisionShape3D`, :ref:`GridMap`, :ref:`ImporterMeshInstance3D`, :ref:`Joint3D`, :ref:`LightmapProbe`, :ref:`Marker3D`, :ref:`NavigationLink3D`, :ref:`NavigationObstacle3D`, :ref:`NavigationRegion3D`, :ref:`OpenXRCompositionLayer`, :ref:`OpenXRHand`, :ref:`OpenXRRenderModel`, :ref:`OpenXRRenderModelManager`, :ref:`Path3D`, :ref:`PathFollow3D`, :ref:`RayCast3D`, :ref:`RemoteTransform3D`, :ref:`ShapeCast3D`, :ref:`Skeleton3D`, :ref:`SkeletonModifier3D`, :ref:`SpringArm3D`, :ref:`SpringBoneCollision3D`, :ref:`VehicleWheel3D`, :ref:`VisualInstance3D`, :ref:`WorldScape3D`, :ref:`XRFaceModifier3D`, :ref:`XRNode3D`, :ref:`XROrigin3D` Base object in 3D space, inherited by all 3D nodes. diff --git a/classes/class_object.rst b/classes/class_object.rst index 4e7ef9f03b5..8582079881f 100644 --- a/classes/class_object.rst +++ b/classes/class_object.rst @@ -10,7 +10,7 @@ Object ====== -**Inherited By:** :ref:`AudioServer`, :ref:`CameraServer`, :ref:`ClassDB`, :ref:`DisplayServer`, :ref:`EditorFileSystemDirectory`, :ref:`EditorInterface`, :ref:`EditorPaths`, :ref:`EditorSelection`, :ref:`EditorUndoRedoManager`, :ref:`EditorVCSInterface`, :ref:`Engine`, :ref:`EngineDebugger`, :ref:`FramebufferCacheRD`, :ref:`GDExtensionManager`, :ref:`Geometry2D`, :ref:`Geometry3D`, :ref:`Input`, :ref:`InputMap`, :ref:`IP`, :ref:`JavaClassWrapper`, :ref:`JavaScriptBridge`, :ref:`JNISingleton`, :ref:`JSONRPC`, :ref:`MainLoop`, :ref:`Marshalls`, :ref:`MCPBridge`, :ref:`MCPServer`, :ref:`MovieWriter`, :ref:`NativeMenu`, :ref:`NavigationMeshGenerator`, :ref:`NavigationServer2D`, :ref:`NavigationServer3D`, :ref:`Node`, :ref:`OpenXRExtensionWrapper`, :ref:`OpenXRInteractionProfileMetadata`, :ref:`OS`, :ref:`Performance`, :ref:`PhysicsDirectBodyState2D`, :ref:`PhysicsDirectBodyState3D`, :ref:`PhysicsDirectSpaceState2D`, :ref:`PhysicsDirectSpaceState3D`, :ref:`PhysicsServer2D`, :ref:`PhysicsServer2DManager`, :ref:`PhysicsServer3D`, :ref:`PhysicsServer3DManager`, :ref:`PhysicsServer3DRenderingServerHandler`, :ref:`ProjectSettings`, :ref:`RefCounted`, :ref:`RenderData`, :ref:`RenderingDevice`, :ref:`RenderingServer`, :ref:`RenderSceneData`, :ref:`ResourceLoader`, :ref:`ResourceSaver`, :ref:`ResourceUID`, :ref:`ScriptLanguage`, :ref:`ShaderIncludeDB`, :ref:`TextServerManager`, :ref:`ThemeDB`, :ref:`TileData`, :ref:`Time`, :ref:`TranslationServer`, :ref:`TreeItem`, :ref:`UndoRedo`, :ref:`UniformSetCacheRD`, :ref:`WorkerThreadPool`, :ref:`XRServer`, :ref:`XRVRS` +**Inherited By:** :ref:`AudioServer`, :ref:`CameraServer`, :ref:`ClassDB`, :ref:`DisplayServer`, :ref:`EditorFileSystemDirectory`, :ref:`EditorInterface`, :ref:`EditorPaths`, :ref:`EditorSelection`, :ref:`EditorUndoRedoManager`, :ref:`EditorVCSInterface`, :ref:`Engine`, :ref:`EngineDebugger`, :ref:`FramebufferCacheRD`, :ref:`GDExtensionManager`, :ref:`Geometry2D`, :ref:`Geometry3D`, :ref:`Input`, :ref:`InputMap`, :ref:`IP`, :ref:`JavaClassWrapper`, :ref:`JavaScriptBridge`, :ref:`JNISingleton`, :ref:`JSONRPC`, :ref:`MainLoop`, :ref:`Marshalls`, :ref:`MCPBridge`, :ref:`MCPServer`, :ref:`MovieWriter`, :ref:`NativeMenu`, :ref:`NavigationMeshGenerator`, :ref:`NavigationServer2D`, :ref:`NavigationServer3D`, :ref:`Node`, :ref:`OpenXRExtensionWrapper`, :ref:`OpenXRInteractionProfileMetadata`, :ref:`OS`, :ref:`Performance`, :ref:`PhysicsDirectBodyState2D`, :ref:`PhysicsDirectBodyState3D`, :ref:`PhysicsDirectSpaceState2D`, :ref:`PhysicsDirectSpaceState3D`, :ref:`PhysicsServer2D`, :ref:`PhysicsServer2DManager`, :ref:`PhysicsServer3D`, :ref:`PhysicsServer3DManager`, :ref:`PhysicsServer3DRenderingServerHandler`, :ref:`ProjectSettings`, :ref:`RefCounted`, :ref:`RenderData`, :ref:`RenderingDevice`, :ref:`RenderingServer`, :ref:`RenderSceneData`, :ref:`ResourceLoader`, :ref:`ResourceSaver`, :ref:`ResourceUID`, :ref:`ScriptLanguage`, :ref:`ShaderIncludeDB`, :ref:`TextServerManager`, :ref:`ThemeDB`, :ref:`TileData`, :ref:`Time`, :ref:`TranslationServer`, :ref:`TreeItem`, :ref:`UndoRedo`, :ref:`UniformSetCacheRD`, :ref:`WorkerThreadPool`, :ref:`WorldScape3DCollision`, :ref:`WorldScape3DData`, :ref:`WorldScape3DEditor`, :ref:`WorldScape3DInstancer`, :ref:`XRServer`, :ref:`XRVRS` Base class for all other classes in the engine. diff --git a/classes/class_os.rst b/classes/class_os.rst index 4ccd021a73b..ae28a01a006 100644 --- a/classes/class_os.rst +++ b/classes/class_os.rst @@ -121,6 +121,8 @@ Methods +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_processor_name`\ (\ ) |const| | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_real_path`\ (\ path\: :ref:`String`\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedStringArray` | :ref:`get_restart_on_exit_arguments`\ (\ ) |const| | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_static_memory_peak_usage`\ (\ ) |const| | @@ -1201,6 +1203,22 @@ Returns the full name of the CPU model on the host machine (e.g. ``"Intel(R) Cor ---- +.. _class_OS_method_get_real_path: + +.. rst-class:: classref-method + +:ref:`String` **get_real_path**\ (\ path\: :ref:`String`\ ) |const| :ref:`🔗` + +Normalizes a given path, removing consecutive double-slash path separators, converts relative path logic to absolute, and resolves all symbolic links. + +\ **Note:** On Windows, if a path passed to the function contains backwards slashes for any path separators, those are replaced with forward slashes. + +\ **Note:** If the function failed for any reason, max path byte limit exceeded, the original input string with forward slash separators is returned. + +.. rst-class:: classref-item-separator + +---- + .. _class_OS_method_get_restart_on_exit_arguments: .. rst-class:: classref-method diff --git a/classes/class_parallax2d.rst b/classes/class_parallax2d.rst index 054d1a3ecaf..7a42b6360f7 100644 --- a/classes/class_parallax2d.rst +++ b/classes/class_parallax2d.rst @@ -49,6 +49,8 @@ Properties +---------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`limit_end` | ``Vector2(10000000, 10000000)`` | +---------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`manual_scroll` | ``Vector2(0, 0)`` | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`PhysicsInterpolationMode` | physics_interpolation_mode | ``2`` (overrides :ref:`Node`) | +---------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`repeat_size` | ``Vector2(0, 0)`` | @@ -156,6 +158,23 @@ Bottom-right limits for scrolling to end. If the camera is outside of this limit ---- +.. _class_Parallax2D_property_manual_scroll: + +.. rst-class:: classref-property + +:ref:`Vector2` **manual_scroll** = ``Vector2(0, 0)`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_manual_scroll**\ (\ value\: :ref:`Vector2`\ ) +- :ref:`Vector2` **get_manual_scroll**\ (\ ) + +Manual scroll offset applied to this **Parallax2D**, in pixels. This property exposes programmatic infinite scroll behavior outside :ref:`autoscroll`. + +.. rst-class:: classref-item-separator + +---- + .. _class_Parallax2D_property_repeat_size: .. rst-class:: classref-property diff --git a/classes/class_projectsettings.rst b/classes/class_projectsettings.rst index 5d1e06f4991..c6cf2e42760 100644 --- a/classes/class_projectsettings.rst +++ b/classes/class_projectsettings.rst @@ -205,6 +205,10 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`debug/gdscript/warnings/exclude_addons` | ``true`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`debug/gdscript/warnings/experimental_struct` | ``1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`debug/gdscript/warnings/experimental_trait` | ``1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`debug/gdscript/warnings/get_node_default_without_onready` | ``2`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`debug/gdscript/warnings/incompatible_ternary` | ``1`` | @@ -241,6 +245,10 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`debug/gdscript/warnings/shadowed_variable_base_class` | ``1`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`debug/gdscript/warnings/show_experimental_struct_warning` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`debug/gdscript/warnings/show_experimental_trait_warning` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`debug/gdscript/warnings/standalone_expression` | ``1`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`debug/gdscript/warnings/standalone_ternary` | ``1`` | @@ -261,6 +269,8 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`debug/gdscript/warnings/unsafe_method_access` | ``0`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`debug/gdscript/warnings/unsafe_nullable_access` | ``1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`debug/gdscript/warnings/unsafe_property_access` | ``0`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`debug/gdscript/warnings/unsafe_void_return` | ``1`` | @@ -275,6 +285,8 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`debug/gdscript/warnings/unused_signal` | ``1`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`debug/gdscript/warnings/unused_static_overriding_trait` | ``1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`debug/gdscript/warnings/unused_variable` | ``1`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`debug/settings/crash_handler/message` | ``"Please include this when reporting the bug to the project developer."`` | @@ -457,7 +469,7 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`display/window/dpi/allow_hidpi` | ``true`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`display/window/energy_saving/keep_screen_on` | ``true`` | + | :ref:`bool` | :ref:`display/window/energy_saving/keep_screen_on` | ``false`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`display/window/frame_pacing/android/enable_frame_pacing` | ``true`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ @@ -1353,6 +1365,8 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`physics/2d/solver/default_contact_bias` | ``0.8`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`physics/2d/solver/pairing_expansion` | ``25.0`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`physics/2d/solver/solver_iterations` | ``16`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`physics/2d/time_before_sleep` | ``0.5`` | @@ -3008,6 +3022,30 @@ If ``true``, scripts in the ``res://addons`` folder will not generate warnings. ---- +.. _class_ProjectSettings_property_debug/gdscript/warnings/experimental_struct: + +.. rst-class:: classref-property + +:ref:`int` **debug/gdscript/warnings/experimental_struct** = ``1`` :ref:`🔗` + +When set to ``warn`` or ``error``, produces a warning or an error respectively when a ``struct`` is declared. Structs are an experimental feature and their syntax and behavior may change in future releases. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_debug/gdscript/warnings/experimental_trait: + +.. rst-class:: classref-property + +:ref:`int` **debug/gdscript/warnings/experimental_trait** = ``1`` :ref:`🔗` + +When set to ``warn`` or ``error``, produces a warning or an error respectively when using traits, as they are still experimental and may be subject to changes in future releases. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_debug/gdscript/warnings/get_node_default_without_onready: .. rst-class:: classref-property @@ -3226,6 +3264,30 @@ When set to ``warn`` or ``error``, produces a warning or an error respectively w ---- +.. _class_ProjectSettings_property_debug/gdscript/warnings/show_experimental_struct_warning: + +.. rst-class:: classref-property + +:ref:`bool` **debug/gdscript/warnings/show_experimental_struct_warning** = ``true`` :ref:`🔗` + +When set to ``true``, the editor will generate warnings when using structs, as they are still experimental and may be subject to changes in future releases. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_debug/gdscript/warnings/show_experimental_trait_warning: + +.. rst-class:: classref-property + +:ref:`bool` **debug/gdscript/warnings/show_experimental_trait_warning** = ``true`` :ref:`🔗` + +When set to ``true``, the editor will generate warnings when using traits, as they are still experimental and may be subject to changes in future releases. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_debug/gdscript/warnings/standalone_expression: .. rst-class:: classref-property @@ -3346,6 +3408,18 @@ When set to ``warn`` or ``error``, produces a warning or an error respectively w ---- +.. _class_ProjectSettings_property_debug/gdscript/warnings/unsafe_nullable_access: + +.. rst-class:: classref-property + +:ref:`int` **debug/gdscript/warnings/unsafe_nullable_access** = ``1`` :ref:`🔗` + +When set to ``warn`` or ``error``, produces a warning or an error respectively when a value of a nullable type (e.g. ``int?``) is used where it may be ``null`` — such as in an operator, subscript, method or property access, or ``for`` loop, or when passed, returned, or assigned to a non-nullable type — without first checking it against ``null``. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_debug/gdscript/warnings/unsafe_property_access: .. rst-class:: classref-property @@ -3432,6 +3506,18 @@ When set to ``warn`` or ``error``, produces a warning or an error respectively w ---- +.. _class_ProjectSettings_property_debug/gdscript/warnings/unused_static_overriding_trait: + +.. rst-class:: classref-property + +:ref:`int` **debug/gdscript/warnings/unused_static_overriding_trait** = ``1`` :ref:`🔗` + +When set to ``warn`` or ``error``, produces a warning or an error respectively when an overridden static member from a trait is not declared with the ``static`` keyword. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_debug/gdscript/warnings/unused_variable: .. rst-class:: classref-property @@ -4538,7 +4624,7 @@ If ``true``, allows HiDPI display on Windows, macOS, Android, iOS and Web. If `` .. rst-class:: classref-property -:ref:`bool` **display/window/energy_saving/keep_screen_on** = ``true`` :ref:`🔗` +:ref:`bool` **display/window/energy_saving/keep_screen_on** = ``false`` :ref:`🔗` If ``true``, keeps the screen on (even in case of inactivity), so the screensaver does not take over. Works on desktop and mobile platforms. @@ -10320,6 +10406,20 @@ Individual shapes can have a specific bias value (see :ref:`Shape2D.custom_solve ---- +.. _class_ProjectSettings_property_physics/2d/solver/pairing_expansion: + +.. rst-class:: classref-property + +:ref:`float` **physics/2d/solver/pairing_expansion** = ``25.0`` :ref:`🔗` + +Maximum broadphase pairing margin, in pixels. Each object's collision pairs are kept alive within a margin that scales with its size (up to this maximum), so large moving objects (such as big :ref:`Area2D` sensors) re-pair less often, improving performance in scenes with many large overlapping shapes. Small objects keep a proportionally tiny margin so dense scenes do not accumulate excess pairs. Set to ``0`` to disable and use the legacy pair-count-based margin. + +\ **Note:** This value is read when a physics space is created, so changing it at runtime does not affect existing physics spaces. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_physics/2d/solver/solver_iterations: .. rst-class:: classref-property diff --git a/classes/class_quaternion.rst b/classes/class_quaternion.rst index 6974574212c..86b457e11b3 100644 --- a/classes/class_quaternion.rst +++ b/classes/class_quaternion.rst @@ -94,45 +94,49 @@ Methods .. table:: :widths: auto - +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`angle_to`\ (\ to\: :ref:`Quaternion`\ ) |const| | - +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`dot`\ (\ with\: :ref:`Quaternion`\ ) |const| | - +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Quaternion` | :ref:`exp`\ (\ ) |const| | - +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Quaternion` | :ref:`from_euler`\ (\ euler\: :ref:`Vector3`\ ) |static| | - +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_angle`\ (\ ) |const| | - +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`get_axis`\ (\ ) |const| | - +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`get_euler`\ (\ order\: :ref:`int` = 2\ ) |const| | - +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Quaternion` | :ref:`inverse`\ (\ ) |const| | - +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_equal_approx`\ (\ to\: :ref:`Quaternion`\ ) |const| | - +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_finite`\ (\ ) |const| | - +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_normalized`\ (\ ) |const| | - +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`length`\ (\ ) |const| | - +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`length_squared`\ (\ ) |const| | - +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Quaternion` | :ref:`log`\ (\ ) |const| | - +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Quaternion` | :ref:`normalized`\ (\ ) |const| | - +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Quaternion` | :ref:`slerp`\ (\ to\: :ref:`Quaternion`, weight\: :ref:`float`\ ) |const| | - +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Quaternion` | :ref:`slerpni`\ (\ to\: :ref:`Quaternion`, weight\: :ref:`float`\ ) |const| | - +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Quaternion` | :ref:`spherical_cubic_interpolate`\ (\ b\: :ref:`Quaternion`, pre_a\: :ref:`Quaternion`, post_b\: :ref:`Quaternion`, weight\: :ref:`float`\ ) |const| | - +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Quaternion` | :ref:`spherical_cubic_interpolate_in_time`\ (\ b\: :ref:`Quaternion`, pre_a\: :ref:`Quaternion`, post_b\: :ref:`Quaternion`, weight\: :ref:`float`, b_t\: :ref:`float`, pre_a_t\: :ref:`float`, post_b_t\: :ref:`float`\ ) |const| | - +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`angle_to`\ (\ to\: :ref:`Quaternion`\ ) |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`dot`\ (\ with\: :ref:`Quaternion`\ ) |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion` | :ref:`exp`\ (\ ) |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion` | :ref:`from_euler`\ (\ euler\: :ref:`Vector3`\ ) |static| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_angle`\ (\ ) |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_axis`\ (\ ) |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_euler`\ (\ order\: :ref:`int` = 2\ ) |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion` | :ref:`inverse`\ (\ ) |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_equal_approx`\ (\ to\: :ref:`Quaternion`\ ) |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_finite`\ (\ ) |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_normalized`\ (\ ) |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`length`\ (\ ) |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`length_squared`\ (\ ) |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion` | :ref:`log`\ (\ ) |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion` | :ref:`normalized`\ (\ ) |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion` | :ref:`slerp`\ (\ to\: :ref:`Quaternion`, weight\: :ref:`float`\ ) |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion` | :ref:`slerpni`\ (\ to\: :ref:`Quaternion`, weight\: :ref:`float`\ ) |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion` | :ref:`spherical_cubic_interpolate`\ (\ b\: :ref:`Quaternion`, pre_a\: :ref:`Quaternion`, post_b\: :ref:`Quaternion`, weight\: :ref:`float`\ ) |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion` | :ref:`spherical_cubic_interpolate_in_time`\ (\ b\: :ref:`Quaternion`, pre_a\: :ref:`Quaternion`, post_b\: :ref:`Quaternion`, weight\: :ref:`float`, b_t\: :ref:`float`, pre_a_t\: :ref:`float`, post_b_t\: :ref:`float`\ ) |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion` | :ref:`spherical_monotonic_cubic_interpolate`\ (\ b\: :ref:`Quaternion`, pre_a\: :ref:`Quaternion`, post_b\: :ref:`Quaternion`, weight\: :ref:`float`\ ) |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion` | :ref:`spherical_monotonic_cubic_interpolate_in_time`\ (\ b\: :ref:`Quaternion`, pre_a\: :ref:`Quaternion`, post_b\: :ref:`Quaternion`, weight\: :ref:`float`, b_t\: :ref:`float`, pre_a_t\: :ref:`float`, post_b_t\: :ref:`float`\ ) |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -570,6 +574,32 @@ Performs a spherical cubic interpolation between quaternions ``pre_a``, this vec It can perform smoother interpolation than :ref:`spherical_cubic_interpolate()` by the time values. +.. rst-class:: classref-item-separator + +---- + +.. _class_Quaternion_method_spherical_monotonic_cubic_interpolate: + +.. rst-class:: classref-method + +:ref:`Quaternion` **spherical_monotonic_cubic_interpolate**\ (\ b\: :ref:`Quaternion`, pre_a\: :ref:`Quaternion`, post_b\: :ref:`Quaternion`, weight\: :ref:`float`\ ) |const| :ref:`🔗` + +Performs a spherical monotonic cubic interpolation between quaternions ``pre_a``, this vector, ``b``, and ``post_b``, by the given amount ``weight``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Quaternion_method_spherical_monotonic_cubic_interpolate_in_time: + +.. rst-class:: classref-method + +:ref:`Quaternion` **spherical_monotonic_cubic_interpolate_in_time**\ (\ b\: :ref:`Quaternion`, pre_a\: :ref:`Quaternion`, post_b\: :ref:`Quaternion`, weight\: :ref:`float`, b_t\: :ref:`float`, pre_a_t\: :ref:`float`, post_b_t\: :ref:`float`\ ) |const| :ref:`🔗` + +Performs a spherical monotonic cubic interpolation between quaternions ``pre_a``, this vector, ``b``, and ``post_b``, by the given amount ``weight``. + +It can perform smoother interpolation than :ref:`spherical_monotonic_cubic_interpolate()` by the time values. + .. rst-class:: classref-section-separator ---- diff --git a/classes/class_refcounted.rst b/classes/class_refcounted.rst index b6f7a105882..7ac7db05b46 100644 --- a/classes/class_refcounted.rst +++ b/classes/class_refcounted.rst @@ -12,7 +12,7 @@ RefCounted **Inherits:** :ref:`Object` -**Inherited By:** :ref:`AESContext`, :ref:`AStar2D`, :ref:`AStar3D`, :ref:`AStarGrid2D`, :ref:`AudioEffectInstance`, :ref:`AudioSample`, :ref:`AudioSamplePlayback`, :ref:`AudioStreamPlayback`, :ref:`CameraFeed`, :ref:`CharFXTransform`, :ref:`ConfigFile`, :ref:`Crypto`, :ref:`DirAccess`, :ref:`DTLSServer`, :ref:`EditorContextMenuPlugin`, :ref:`EditorDebuggerPlugin`, :ref:`EditorDebuggerSession`, :ref:`EditorExportPlatform`, :ref:`EditorExportPlugin`, :ref:`EditorExportPreset`, :ref:`EditorFeatureProfile`, :ref:`EditorFileSystemImportFormatSupportQuery`, :ref:`EditorInspectorPlugin`, :ref:`EditorResourceConversionPlugin`, :ref:`EditorResourcePreviewGenerator`, :ref:`EditorResourceTooltipPlugin`, :ref:`EditorSceneFormatImporter`, :ref:`EditorScenePostImport`, :ref:`EditorScenePostImportPlugin`, :ref:`EditorScript`, :ref:`EditorTranslationParserPlugin`, :ref:`EncodedObjectAsID`, :ref:`ENetConnection`, :ref:`EngineProfiler`, :ref:`Expression`, :ref:`FileAccess`, :ref:`GLTFObjectModelProperty`, :ref:`HashingContext`, :ref:`HMACContext`, :ref:`HTTPClient`, :ref:`ImageFormatLoader`, :ref:`ImageFramesFormatLoader`, :ref:`JavaClass`, :ref:`JavaObject`, :ref:`JavaScriptObject`, :ref:`KinematicCollision2D`, :ref:`KinematicCollision3D`, :ref:`Lightmapper`, :ref:`Logger`, :ref:`MeshConvexDecompositionSettings`, :ref:`MeshDataTool`, :ref:`MultiplayerAPI`, :ref:`Mutex`, :ref:`NavigationPathQueryParameters2D`, :ref:`NavigationPathQueryParameters3D`, :ref:`NavigationPathQueryResult2D`, :ref:`NavigationPathQueryResult3D`, :ref:`Node3DGizmo`, :ref:`OggPacketSequencePlayback`, :ref:`OpenXRAPIExtension`, :ref:`OpenXRFutureResult`, :ref:`PackedDataContainerRef`, :ref:`PacketPeer`, :ref:`PCKPacker`, :ref:`PhysicsPointQueryParameters2D`, :ref:`PhysicsPointQueryParameters3D`, :ref:`PhysicsRayQueryParameters2D`, :ref:`PhysicsRayQueryParameters3D`, :ref:`PhysicsShapeQueryParameters2D`, :ref:`PhysicsShapeQueryParameters3D`, :ref:`PhysicsTestMotionParameters2D`, :ref:`PhysicsTestMotionParameters3D`, :ref:`PhysicsTestMotionResult2D`, :ref:`PhysicsTestMotionResult3D`, :ref:`RandomNumberGenerator`, :ref:`RDAttachmentFormat`, :ref:`RDFramebufferPass`, :ref:`RDPipelineColorBlendState`, :ref:`RDPipelineColorBlendStateAttachment`, :ref:`RDPipelineDepthStencilState`, :ref:`RDPipelineMultisampleState`, :ref:`RDPipelineRasterizationState`, :ref:`RDPipelineSpecializationConstant`, :ref:`RDSamplerState`, :ref:`RDShaderSource`, :ref:`RDTextureFormat`, :ref:`RDTextureView`, :ref:`RDUniform`, :ref:`RDVertexAttribute`, :ref:`RegEx`, :ref:`RegExMatch`, :ref:`RenderSceneBuffers`, :ref:`RenderSceneBuffersConfiguration`, :ref:`Resource`, :ref:`ResourceFormatLoader`, :ref:`ResourceFormatSaver`, :ref:`ResourceImporter`, :ref:`SceneState`, :ref:`SceneTreeTimer`, :ref:`ScriptBacktrace`, :ref:`Semaphore`, :ref:`SignalSmith`, :ref:`SkinReference`, :ref:`StreamPeer`, :ref:`SurfaceTool`, :ref:`TCPServer`, :ref:`TextLine`, :ref:`TextParagraph`, :ref:`TextServer`, :ref:`Thread`, :ref:`TLSOptions`, :ref:`TranslationDomain`, :ref:`TriangleMesh`, :ref:`Tween`, :ref:`Tweener`, :ref:`UDPServer`, :ref:`UPNP`, :ref:`UPNPDevice`, :ref:`WeakRef`, :ref:`WebRTCPeerConnection`, :ref:`XMLParser`, :ref:`XRInterface`, :ref:`XRPose`, :ref:`XRTracker`, :ref:`ZIPPacker`, :ref:`ZIPReader` +**Inherited By:** :ref:`AESContext`, :ref:`AStar2D`, :ref:`AStar3D`, :ref:`AStarGrid2D`, :ref:`AudioEffectInstance`, :ref:`AudioSample`, :ref:`AudioSamplePlayback`, :ref:`AudioStreamPlayback`, :ref:`CameraFeed`, :ref:`CharFXTransform`, :ref:`ConfigFile`, :ref:`Crypto`, :ref:`DirAccess`, :ref:`DTLSServer`, :ref:`EditorContextMenuPlugin`, :ref:`EditorDebuggerPlugin`, :ref:`EditorDebuggerSession`, :ref:`EditorExportPlatform`, :ref:`EditorExportPlugin`, :ref:`EditorExportPreset`, :ref:`EditorFeatureProfile`, :ref:`EditorFileSystemImportFormatSupportQuery`, :ref:`EditorInspectorPlugin`, :ref:`EditorResourceConversionPlugin`, :ref:`EditorResourcePreviewGenerator`, :ref:`EditorResourceTooltipPlugin`, :ref:`EditorSceneFormatImporter`, :ref:`EditorScenePostImport`, :ref:`EditorScenePostImportPlugin`, :ref:`EditorScript`, :ref:`EditorTranslationParserPlugin`, :ref:`EncodedObjectAsID`, :ref:`ENetConnection`, :ref:`EngineProfiler`, :ref:`Expression`, :ref:`FileAccess`, :ref:`GLTFObjectModelProperty`, :ref:`HashingContext`, :ref:`HMACContext`, :ref:`HTTPClient`, :ref:`ImageFormatLoader`, :ref:`ImageFramesFormatLoader`, :ref:`JavaClass`, :ref:`JavaObject`, :ref:`JavaScriptObject`, :ref:`KinematicCollision2D`, :ref:`KinematicCollision3D`, :ref:`Lightmapper`, :ref:`Logger`, :ref:`MeshConvexDecompositionSettings`, :ref:`MeshDataTool`, :ref:`MultiplayerAPI`, :ref:`Mutex`, :ref:`NavigationPathQueryParameters2D`, :ref:`NavigationPathQueryParameters3D`, :ref:`NavigationPathQueryResult2D`, :ref:`NavigationPathQueryResult3D`, :ref:`Node3DGizmo`, :ref:`OggPacketSequencePlayback`, :ref:`OpenXRAPIExtension`, :ref:`OpenXRFutureResult`, :ref:`PackedDataContainerRef`, :ref:`PacketPeer`, :ref:`PCKPacker`, :ref:`PhysicsPointQueryParameters2D`, :ref:`PhysicsPointQueryParameters3D`, :ref:`PhysicsRayQueryParameters2D`, :ref:`PhysicsRayQueryParameters3D`, :ref:`PhysicsShapeQueryParameters2D`, :ref:`PhysicsShapeQueryParameters3D`, :ref:`PhysicsTestMotionParameters2D`, :ref:`PhysicsTestMotionParameters3D`, :ref:`PhysicsTestMotionResult2D`, :ref:`PhysicsTestMotionResult3D`, :ref:`RandomNumberGenerator`, :ref:`RDAttachmentFormat`, :ref:`RDFramebufferPass`, :ref:`RDPipelineColorBlendState`, :ref:`RDPipelineColorBlendStateAttachment`, :ref:`RDPipelineDepthStencilState`, :ref:`RDPipelineMultisampleState`, :ref:`RDPipelineRasterizationState`, :ref:`RDPipelineSpecializationConstant`, :ref:`RDSamplerState`, :ref:`RDShaderSource`, :ref:`RDTextureFormat`, :ref:`RDTextureView`, :ref:`RDUniform`, :ref:`RDVertexAttribute`, :ref:`RegEx`, :ref:`RegExMatch`, :ref:`RenderSceneBuffers`, :ref:`RenderSceneBuffersConfiguration`, :ref:`Resource`, :ref:`ResourceFormatLoader`, :ref:`ResourceFormatSaver`, :ref:`ResourceImporter`, :ref:`SceneState`, :ref:`SceneTreeTimer`, :ref:`ScriptBacktrace`, :ref:`Semaphore`, :ref:`SkinReference`, :ref:`SoundSmith`, :ref:`StreamPeer`, :ref:`SurfaceTool`, :ref:`TCPServer`, :ref:`TextLine`, :ref:`TextParagraph`, :ref:`TextServer`, :ref:`Thread`, :ref:`TLSOptions`, :ref:`TranslationDomain`, :ref:`TriangleMesh`, :ref:`Tween`, :ref:`Tweener`, :ref:`UDPServer`, :ref:`UPNP`, :ref:`UPNPDevice`, :ref:`WeakRef`, :ref:`WebRTCPeerConnection`, :ref:`XMLParser`, :ref:`XRInterface`, :ref:`XRPose`, :ref:`XRTracker`, :ref:`ZIPPacker`, :ref:`ZIPReader` Base class for reference-counted objects. diff --git a/classes/class_resource.rst b/classes/class_resource.rst index 2a3bbbf211c..2d78d67745a 100644 --- a/classes/class_resource.rst +++ b/classes/class_resource.rst @@ -12,7 +12,7 @@ Resource **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`Animation`, :ref:`AnimationLibrary`, :ref:`AnimationNode`, :ref:`AnimationNodeStateMachinePlayback`, :ref:`AnimationNodeStateMachineTransition`, :ref:`AudioBusLayout`, :ref:`AudioEffect`, :ref:`AudioStream`, :ref:`BitMap`, :ref:`BoneMap`, :ref:`ButtonGroup`, :ref:`CameraAttributes`, :ref:`ColorPalette`, :ref:`Compositor`, :ref:`CompositorEffect`, :ref:`CryptoKey`, :ref:`Curve`, :ref:`Curve2D`, :ref:`Curve3D`, :ref:`EditorNode3DGizmoPlugin`, :ref:`EditorSettings`, :ref:`Environment`, :ref:`FoldableGroup`, :ref:`Font`, :ref:`GDExtension`, :ref:`GLTFAccessor`, :ref:`GLTFAnimation`, :ref:`GLTFBufferView`, :ref:`GLTFCamera`, :ref:`GLTFDocument`, :ref:`GLTFDocumentExtension`, :ref:`GLTFLight`, :ref:`GLTFMesh`, :ref:`GLTFNode`, :ref:`GLTFPhysicsBody`, :ref:`GLTFPhysicsShape`, :ref:`GLTFSkeleton`, :ref:`GLTFSkin`, :ref:`GLTFSpecGloss`, :ref:`GLTFState`, :ref:`GLTFTexture`, :ref:`GLTFTextureSampler`, :ref:`Gradient`, :ref:`Image`, :ref:`ImageFrames`, :ref:`ImporterMesh`, :ref:`InputEvent`, :ref:`JSON`, :ref:`LabelSettings`, :ref:`LightmapGIData`, :ref:`Material`, :ref:`Mesh`, :ref:`MeshLibrary`, :ref:`MissingResource`, :ref:`MultiMesh`, :ref:`NavigationMesh`, :ref:`NavigationMeshSourceGeometryData2D`, :ref:`NavigationMeshSourceGeometryData3D`, :ref:`NavigationPolygon`, :ref:`Noise`, :ref:`Occluder3D`, :ref:`OccluderPolygon2D`, :ref:`OggPacketSequence`, :ref:`OpenXRAction`, :ref:`OpenXRActionMap`, :ref:`OpenXRActionSet`, :ref:`OpenXRBindingModifier`, :ref:`OpenXRHapticBase`, :ref:`OpenXRInteractionProfile`, :ref:`OpenXRIPBinding`, :ref:`PackedDataContainer`, :ref:`PackedScene`, :ref:`PhysicsMaterial`, :ref:`PolygonPathFinder`, :ref:`RDShaderFile`, :ref:`RDShaderSPIRV`, :ref:`RichTextEffect`, :ref:`SceneReplicationConfig`, :ref:`Script`, :ref:`Shader`, :ref:`ShaderInclude`, :ref:`Shape2D`, :ref:`Shape3D`, :ref:`Shortcut`, :ref:`SkeletonModification2D`, :ref:`SkeletonModificationStack2D`, :ref:`SkeletonProfile`, :ref:`Skin`, :ref:`Sky`, :ref:`SpriteFrames`, :ref:`StyleBox`, :ref:`SyntaxHighlighter`, :ref:`Texture`, :ref:`Theme`, :ref:`TileMapPattern`, :ref:`TileSet`, :ref:`TileSetSource`, :ref:`Translation`, :ref:`VideoStream`, :ref:`VideoStreamPlayback`, :ref:`VisualShaderNode`, :ref:`VoxelGIData`, :ref:`World2D`, :ref:`World3D`, :ref:`X509Certificate` +**Inherited By:** :ref:`Animation`, :ref:`AnimationLibrary`, :ref:`AnimationNode`, :ref:`AnimationNodeStateMachinePlayback`, :ref:`AnimationNodeStateMachineTransition`, :ref:`AudioBusLayout`, :ref:`AudioEffect`, :ref:`AudioStream`, :ref:`BitMap`, :ref:`BoneMap`, :ref:`ButtonGroup`, :ref:`CameraAttributes`, :ref:`ColorPalette`, :ref:`Compositor`, :ref:`CompositorEffect`, :ref:`CryptoKey`, :ref:`Curve`, :ref:`Curve2D`, :ref:`Curve3D`, :ref:`EditorNode3DGizmoPlugin`, :ref:`EditorSettings`, :ref:`Environment`, :ref:`FoldableGroup`, :ref:`Font`, :ref:`GDExtension`, :ref:`GLTFAccessor`, :ref:`GLTFAnimation`, :ref:`GLTFBufferView`, :ref:`GLTFCamera`, :ref:`GLTFDocument`, :ref:`GLTFDocumentExtension`, :ref:`GLTFLight`, :ref:`GLTFMesh`, :ref:`GLTFNode`, :ref:`GLTFPhysicsBody`, :ref:`GLTFPhysicsShape`, :ref:`GLTFSkeleton`, :ref:`GLTFSkin`, :ref:`GLTFSpecGloss`, :ref:`GLTFState`, :ref:`GLTFTexture`, :ref:`GLTFTextureSampler`, :ref:`Gradient`, :ref:`Image`, :ref:`ImageFrames`, :ref:`ImporterMesh`, :ref:`InputEvent`, :ref:`JointLimitation3D`, :ref:`JSON`, :ref:`LabelSettings`, :ref:`LightmapGIData`, :ref:`Material`, :ref:`Mesh`, :ref:`MeshLibrary`, :ref:`MissingResource`, :ref:`Mode7ScanlineOverride`, :ref:`MultiMesh`, :ref:`NavigationMesh`, :ref:`NavigationMeshSourceGeometryData2D`, :ref:`NavigationMeshSourceGeometryData3D`, :ref:`NavigationPolygon`, :ref:`Noise`, :ref:`Occluder3D`, :ref:`OccluderPolygon2D`, :ref:`OggPacketSequence`, :ref:`OpenXRAction`, :ref:`OpenXRActionMap`, :ref:`OpenXRActionSet`, :ref:`OpenXRBindingModifier`, :ref:`OpenXRHapticBase`, :ref:`OpenXRInteractionProfile`, :ref:`OpenXRIPBinding`, :ref:`PackedDataContainer`, :ref:`PackedScene`, :ref:`PhysicsMaterial`, :ref:`PolygonPathFinder`, :ref:`RDShaderFile`, :ref:`RDShaderSPIRV`, :ref:`RichTextEffect`, :ref:`SceneReplicationConfig`, :ref:`Script`, :ref:`Shader`, :ref:`ShaderInclude`, :ref:`Shape2D`, :ref:`Shape3D`, :ref:`Shortcut`, :ref:`SkeletonModification2D`, :ref:`SkeletonModificationStack2D`, :ref:`SkeletonProfile`, :ref:`Skin`, :ref:`Sky`, :ref:`SpriteFrames`, :ref:`StyleBox`, :ref:`SyntaxHighlighter`, :ref:`Texture`, :ref:`Theme`, :ref:`TileMapPattern`, :ref:`TileSet`, :ref:`TileSetSource`, :ref:`Translation`, :ref:`VideoStream`, :ref:`VideoStreamPlayback`, :ref:`VisualShaderNode`, :ref:`VoxelGIData`, :ref:`World2D`, :ref:`World3D`, :ref:`WorldScape3DAssetResource`, :ref:`WorldScape3DAssets`, :ref:`WorldScape3DMaterial`, :ref:`WorldScape3DRegion`, :ref:`X509Certificate` Base class for serializable objects. @@ -249,7 +249,7 @@ The unique path to this resource. If it has been saved to disk, the value will b - |void| **set_scene_unique_id**\ (\ value\: :ref:`String`\ ) - :ref:`String` **get_scene_unique_id**\ (\ ) -A unique identifier relative to the this resource's scene. If left empty, the ID is automatically generated when this resource is saved inside a :ref:`PackedScene`. If the resource is not inside a scene, this property is empty by default. +A unique identifier relative to this resource's scene. If left empty, the ID is automatically generated when this resource is saved inside a :ref:`PackedScene`. If the resource is not inside a scene, this property is empty by default. \ **Note:** When the :ref:`PackedScene` is saved, if multiple resources in the same scene use the same ID, only the earliest resource in the scene hierarchy keeps the original ID. The other resources are assigned new IDs from :ref:`generate_scene_unique_id()`. diff --git a/classes/class_scenereplicationconfig.rst b/classes/class_scenereplicationconfig.rst index ea2877f0836..ab660ccb668 100644 --- a/classes/class_scenereplicationconfig.rst +++ b/classes/class_scenereplicationconfig.rst @@ -22,33 +22,37 @@ Methods .. table:: :widths: auto - +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`add_property`\ (\ path\: :ref:`NodePath`, index\: :ref:`int` = -1\ ) | - +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array`\[:ref:`NodePath`\] | :ref:`get_properties`\ (\ ) |const| | - +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_property`\ (\ path\: :ref:`NodePath`\ ) |const| | - +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`property_get_index`\ (\ path\: :ref:`NodePath`\ ) |const| | - +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`ReplicationMode` | :ref:`property_get_replication_mode`\ (\ path\: :ref:`NodePath`\ ) | - +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`property_get_spawn`\ (\ path\: :ref:`NodePath`\ ) | - +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`property_get_sync`\ (\ path\: :ref:`NodePath`\ ) | - +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`property_get_watch`\ (\ path\: :ref:`NodePath`\ ) | - +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`property_set_replication_mode`\ (\ path\: :ref:`NodePath`, mode\: :ref:`ReplicationMode`\ ) | - +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`property_set_spawn`\ (\ path\: :ref:`NodePath`, enabled\: :ref:`bool`\ ) | - +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`property_set_sync`\ (\ path\: :ref:`NodePath`, enabled\: :ref:`bool`\ ) | - +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`property_set_watch`\ (\ path\: :ref:`NodePath`, enabled\: :ref:`bool`\ ) | - +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`remove_property`\ (\ path\: :ref:`NodePath`\ ) | - +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_property`\ (\ path\: :ref:`NodePath`, index\: :ref:`int` = -1\ ) | + +-------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`NodePath`\] | :ref:`get_properties`\ (\ ) |const| | + +-------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_property`\ (\ path\: :ref:`NodePath`\ ) |const| | + +-------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`property_get_index`\ (\ path\: :ref:`NodePath`\ ) |const| | + +-------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ReplicationPrecision` | :ref:`property_get_precision`\ (\ path\: :ref:`NodePath`\ ) | + +-------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ReplicationMode` | :ref:`property_get_replication_mode`\ (\ path\: :ref:`NodePath`\ ) | + +-------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`property_get_spawn`\ (\ path\: :ref:`NodePath`\ ) | + +-------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`property_get_sync`\ (\ path\: :ref:`NodePath`\ ) | + +-------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`property_get_watch`\ (\ path\: :ref:`NodePath`\ ) | + +-------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`property_set_precision`\ (\ path\: :ref:`NodePath`, precision\: :ref:`ReplicationPrecision`\ ) | + +-------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`property_set_replication_mode`\ (\ path\: :ref:`NodePath`, mode\: :ref:`ReplicationMode`\ ) | + +-------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`property_set_spawn`\ (\ path\: :ref:`NodePath`, enabled\: :ref:`bool`\ ) | + +-------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`property_set_sync`\ (\ path\: :ref:`NodePath`, enabled\: :ref:`bool`\ ) | + +-------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`property_set_watch`\ (\ path\: :ref:`NodePath`, enabled\: :ref:`bool`\ ) | + +-------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_property`\ (\ path\: :ref:`NodePath`\ ) | + +-------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -89,6 +93,32 @@ Replicate the given property on process by constantly sending updates using unre Replicate the given property on process by sending updates using reliable transfer mode when its value changes. +.. rst-class:: classref-item-separator + +---- + +.. _enum_SceneReplicationConfig_ReplicationPrecision: + +.. rst-class:: classref-enumeration + +enum **ReplicationPrecision**: :ref:`🔗` + +.. _class_SceneReplicationConfig_constant_PRECISION_FULL: + +.. rst-class:: classref-enumeration-constant + +:ref:`ReplicationPrecision` **PRECISION_FULL** = ``0`` + +Replicate the given property at full precision using the standard variant encoding. This is the default. + +.. _class_SceneReplicationConfig_constant_PRECISION_HALF: + +.. rst-class:: classref-enumeration-constant + +:ref:`ReplicationPrecision` **PRECISION_HALF** = ``1`` + +Replicate the given property using half-precision (16-bit) floats to save bandwidth. Applies to :ref:`float`, :ref:`Vector2`, :ref:`Vector3`, :ref:`Vector4`, :ref:`Quaternion` and :ref:`Color`; other types fall back to full precision. Reduces range and precision, so it is best suited to values that tolerate small errors (positions on modest maps, velocities, rotations, colors). Both peers must use the same configuration. + .. rst-class:: classref-section-separator ---- @@ -148,6 +178,18 @@ Finds the index of the given ``path``. ---- +.. _class_SceneReplicationConfig_method_property_get_precision: + +.. rst-class:: classref-method + +:ref:`ReplicationPrecision` **property_get_precision**\ (\ path\: :ref:`NodePath`\ ) :ref:`🔗` + +Returns the wire precision used for the property identified by the given ``path``. See :ref:`ReplicationPrecision`. + +.. rst-class:: classref-item-separator + +---- + .. _class_SceneReplicationConfig_method_property_get_replication_mode: .. rst-class:: classref-method @@ -200,6 +242,18 @@ Returns ``true`` if the property identified by the given ``path`` is configured ---- +.. _class_SceneReplicationConfig_method_property_set_precision: + +.. rst-class:: classref-method + +|void| **property_set_precision**\ (\ path\: :ref:`NodePath`, precision\: :ref:`ReplicationPrecision`\ ) :ref:`🔗` + +Sets the wire precision used for the property identified by the given ``path``. See :ref:`ReplicationPrecision`. Both peers must use the same configuration. + +.. rst-class:: classref-item-separator + +---- + .. _class_SceneReplicationConfig_method_property_set_replication_mode: .. rst-class:: classref-method diff --git a/classes/class_skeletonmodifier3d.rst b/classes/class_skeletonmodifier3d.rst index 3f0074e4820..0869f567cee 100644 --- a/classes/class_skeletonmodifier3d.rst +++ b/classes/class_skeletonmodifier3d.rst @@ -12,7 +12,7 @@ SkeletonModifier3D **Inherits:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`BoneConstraint3D`, :ref:`LookAtModifier3D`, :ref:`ModifierBoneTarget3D`, :ref:`PhysicalBoneSimulator3D`, :ref:`RetargetModifier3D`, :ref:`SkeletonIK3D`, :ref:`SpringBoneSimulator3D`, :ref:`XRBodyModifier3D`, :ref:`XRHandModifier3D` +**Inherited By:** :ref:`BoneConstraint3D`, :ref:`BoneTwistDisperser3D`, :ref:`IKModifier3D`, :ref:`LimitAngularVelocityModifier3D`, :ref:`LookAtModifier3D`, :ref:`ModifierBoneTarget3D`, :ref:`PhysicalBoneSimulator3D`, :ref:`RetargetModifier3D`, :ref:`SkeletonIK3D`, :ref:`SpringBoneSimulator3D`, :ref:`XRBodyModifier3D`, :ref:`XRHandModifier3D` A node that may modify a Skeleton3D's bones. @@ -150,6 +150,196 @@ Enumerated value for the +Z axis. Enumerated value for the -Z axis. +.. rst-class:: classref-item-separator + +---- + +.. _enum_SkeletonModifier3D_BoneDirection: + +.. rst-class:: classref-enumeration + +enum **BoneDirection**: :ref:`🔗` + +.. _class_SkeletonModifier3D_constant_BONE_DIRECTION_PLUS_X: + +.. rst-class:: classref-enumeration-constant + +:ref:`BoneDirection` **BONE_DIRECTION_PLUS_X** = ``0`` + +Enumerated value for the +X axis. + +.. _class_SkeletonModifier3D_constant_BONE_DIRECTION_MINUS_X: + +.. rst-class:: classref-enumeration-constant + +:ref:`BoneDirection` **BONE_DIRECTION_MINUS_X** = ``1`` + +Enumerated value for the -X axis. + +.. _class_SkeletonModifier3D_constant_BONE_DIRECTION_PLUS_Y: + +.. rst-class:: classref-enumeration-constant + +:ref:`BoneDirection` **BONE_DIRECTION_PLUS_Y** = ``2`` + +Enumerated value for the +Y axis. + +.. _class_SkeletonModifier3D_constant_BONE_DIRECTION_MINUS_Y: + +.. rst-class:: classref-enumeration-constant + +:ref:`BoneDirection` **BONE_DIRECTION_MINUS_Y** = ``3`` + +Enumerated value for the -Y axis. + +.. _class_SkeletonModifier3D_constant_BONE_DIRECTION_PLUS_Z: + +.. rst-class:: classref-enumeration-constant + +:ref:`BoneDirection` **BONE_DIRECTION_PLUS_Z** = ``4`` + +Enumerated value for the +Z axis. + +.. _class_SkeletonModifier3D_constant_BONE_DIRECTION_MINUS_Z: + +.. rst-class:: classref-enumeration-constant + +:ref:`BoneDirection` **BONE_DIRECTION_MINUS_Z** = ``5`` + +Enumerated value for the -Z axis. + +.. _class_SkeletonModifier3D_constant_BONE_DIRECTION_FROM_PARENT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BoneDirection` **BONE_DIRECTION_FROM_PARENT** = ``6`` + +Enumerated value for the axis from a parent bone to the child bone. + +.. rst-class:: classref-item-separator + +---- + +.. _enum_SkeletonModifier3D_SecondaryDirection: + +.. rst-class:: classref-enumeration + +enum **SecondaryDirection**: :ref:`🔗` + +.. _class_SkeletonModifier3D_constant_SECONDARY_DIRECTION_NONE: + +.. rst-class:: classref-enumeration-constant + +:ref:`SecondaryDirection` **SECONDARY_DIRECTION_NONE** = ``0`` + +Enumerated value for the case when the axis is undefined. + +.. _class_SkeletonModifier3D_constant_SECONDARY_DIRECTION_PLUS_X: + +.. rst-class:: classref-enumeration-constant + +:ref:`SecondaryDirection` **SECONDARY_DIRECTION_PLUS_X** = ``1`` + +Enumerated value for the +X axis. + +.. _class_SkeletonModifier3D_constant_SECONDARY_DIRECTION_MINUS_X: + +.. rst-class:: classref-enumeration-constant + +:ref:`SecondaryDirection` **SECONDARY_DIRECTION_MINUS_X** = ``2`` + +Enumerated value for the -X axis. + +.. _class_SkeletonModifier3D_constant_SECONDARY_DIRECTION_PLUS_Y: + +.. rst-class:: classref-enumeration-constant + +:ref:`SecondaryDirection` **SECONDARY_DIRECTION_PLUS_Y** = ``3`` + +Enumerated value for the +Y axis. + +.. _class_SkeletonModifier3D_constant_SECONDARY_DIRECTION_MINUS_Y: + +.. rst-class:: classref-enumeration-constant + +:ref:`SecondaryDirection` **SECONDARY_DIRECTION_MINUS_Y** = ``4`` + +Enumerated value for the -Y axis. + +.. _class_SkeletonModifier3D_constant_SECONDARY_DIRECTION_PLUS_Z: + +.. rst-class:: classref-enumeration-constant + +:ref:`SecondaryDirection` **SECONDARY_DIRECTION_PLUS_Z** = ``5`` + +Enumerated value for the +Z axis. + +.. _class_SkeletonModifier3D_constant_SECONDARY_DIRECTION_MINUS_Z: + +.. rst-class:: classref-enumeration-constant + +:ref:`SecondaryDirection` **SECONDARY_DIRECTION_MINUS_Z** = ``6`` + +Enumerated value for the -Z axis. + +.. _class_SkeletonModifier3D_constant_SECONDARY_DIRECTION_CUSTOM: + +.. rst-class:: classref-enumeration-constant + +:ref:`SecondaryDirection` **SECONDARY_DIRECTION_CUSTOM** = ``7`` + +Enumerated value for an optional axis. + +.. rst-class:: classref-item-separator + +---- + +.. _enum_SkeletonModifier3D_RotationAxis: + +.. rst-class:: classref-enumeration + +enum **RotationAxis**: :ref:`🔗` + +.. _class_SkeletonModifier3D_constant_ROTATION_AXIS_X: + +.. rst-class:: classref-enumeration-constant + +:ref:`RotationAxis` **ROTATION_AXIS_X** = ``0`` + +Enumerated value for the rotation of the X axis. + +.. _class_SkeletonModifier3D_constant_ROTATION_AXIS_Y: + +.. rst-class:: classref-enumeration-constant + +:ref:`RotationAxis` **ROTATION_AXIS_Y** = ``1`` + +Enumerated value for the rotation of the Y axis. + +.. _class_SkeletonModifier3D_constant_ROTATION_AXIS_Z: + +.. rst-class:: classref-enumeration-constant + +:ref:`RotationAxis` **ROTATION_AXIS_Z** = ``2`` + +Enumerated value for the rotation of the Z axis. + +.. _class_SkeletonModifier3D_constant_ROTATION_AXIS_ALL: + +.. rst-class:: classref-enumeration-constant + +:ref:`RotationAxis` **ROTATION_AXIS_ALL** = ``3`` + +Enumerated value for the unconstrained rotation. + +.. _class_SkeletonModifier3D_constant_ROTATION_AXIS_CUSTOM: + +.. rst-class:: classref-enumeration-constant + +:ref:`RotationAxis` **ROTATION_AXIS_CUSTOM** = ``4`` + +Enumerated value for an optional rotation axis. + .. rst-class:: classref-section-separator ---- @@ -228,6 +418,8 @@ Override this virtual method to implement a custom skeleton modifier. You should \ ``delta`` is passed from parent :ref:`Skeleton3D`. See also :ref:`Skeleton3D.advance()`. +\ **Note:** This method may be called outside :ref:`Node._process()` and :ref:`Node._physics_process()` with ``delta`` is ``0.0``, since the modification should be processed immediately after initialization of the :ref:`Skeleton3D`. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_signalsmith.rst b/classes/class_soundsmith.rst similarity index 70% rename from classes/class_signalsmith.rst rename to classes/class_soundsmith.rst index 5e2b4c82541..8015f82a363 100644 --- a/classes/class_signalsmith.rst +++ b/classes/class_soundsmith.rst @@ -3,23 +3,23 @@ .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Redot engine sources. .. Generator: https://github.com/Redot-Engine/redot-engine/tree/master/doc/tools/make_rst.py. -.. XML source: https://github.com/Redot-Engine/redot-engine/tree/master/doc/classes/SignalSmith.xml. +.. XML source: https://github.com/Redot-Engine/redot-engine/tree/master/doc/classes/SoundSmith.xml. -.. _class_SignalSmith: +.. _class_SoundSmith: -SignalSmith -=========== +SoundSmith +========== **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -Performs time-stretching and pitch-shifting on raw audio buffers using Signalsmith. +Performs time-stretching and pitch-shifting on raw audio buffers using Soundsmith. .. rst-class:: classref-introduction-group Description ----------- -SignalSmith is a low-level audio processing utility which wraps the Signalsmith time-stretching library. It operates on raw interleaved floating-point PCM audio buffers and allows independent control of playback tempo and pitch. +SoundSmith is a low-level audio processing utility which wraps the Soundsmith time-stretching library. It operates on raw interleaved floating-point PCM audio buffers and allows independent control of playback tempo and pitch. .. rst-class:: classref-reftable-group @@ -29,25 +29,25 @@ Methods .. table:: :widths: auto - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`AudioStreamWAV` | :ref:`change_tempo`\ (\ path\: :ref:`String`, tempo\: :ref:`float`, pitch\: :ref:`float` = 1.0\ ) | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_last_channels`\ (\ ) |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_last_sample_rate`\ (\ ) |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedFloat32Array` | :ref:`process`\ (\ input\: :ref:`PackedFloat32Array`\ ) | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`reset`\ (\ ) | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_channels`\ (\ channels\: :ref:`int`\ ) | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_pitch`\ (\ pitch\: :ref:`float`\ ) | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_sample_rate`\ (\ rate\: :ref:`int`\ ) | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_tempo`\ (\ tempo\: :ref:`float`\ ) | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AudioStreamWAV` | :ref:`change_tempo`\ (\ path\: :ref:`String`, tempo\: :ref:`float`, pitch\: :ref:`float` = 1.0\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_last_channels`\ (\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_last_sample_rate`\ (\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedFloat32Array` | :ref:`process`\ (\ input\: :ref:`PackedFloat32Array`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`reset`\ (\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_channels`\ (\ channels\: :ref:`int`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_pitch`\ (\ pitch\: :ref:`float`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_sample_rate`\ (\ rate\: :ref:`int`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_tempo`\ (\ tempo\: :ref:`float`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -58,13 +58,13 @@ Methods Method Descriptions ------------------- -.. _class_SignalSmith_method_change_tempo: +.. _class_SoundSmith_method_change_tempo: .. rst-class:: classref-method -:ref:`AudioStreamWAV` **change_tempo**\ (\ path\: :ref:`String`, tempo\: :ref:`float`, pitch\: :ref:`float` = 1.0\ ) :ref:`🔗` +:ref:`AudioStreamWAV` **change_tempo**\ (\ path\: :ref:`String`, tempo\: :ref:`float`, pitch\: :ref:`float` = 1.0\ ) :ref:`🔗` -Loads an MP3 file, applies time-stretching and pitch-shifting using the Signalsmith engine, and returns a streamable AudioStreamWAV. +Loads an MP3 file, applies time-stretching and pitch-shifting using the Soundsmith engine, and returns a streamable AudioStreamWAV. The `tempo` parameter controls playback speed without affecting pitch. A value of `1.0` preserves the original speed. @@ -76,11 +76,11 @@ and `0.5` lowers pitch by one octave. ---- -.. _class_SignalSmith_method_get_last_channels: +.. _class_SoundSmith_method_get_last_channels: .. rst-class:: classref-method -:ref:`int` **get_last_channels**\ (\ ) |const| :ref:`🔗` +:ref:`int` **get_last_channels**\ (\ ) |const| :ref:`🔗` .. container:: contribute @@ -90,11 +90,11 @@ and `0.5` lowers pitch by one octave. ---- -.. _class_SignalSmith_method_get_last_sample_rate: +.. _class_SoundSmith_method_get_last_sample_rate: .. rst-class:: classref-method -:ref:`int` **get_last_sample_rate**\ (\ ) |const| :ref:`🔗` +:ref:`int` **get_last_sample_rate**\ (\ ) |const| :ref:`🔗` .. container:: contribute @@ -104,11 +104,11 @@ and `0.5` lowers pitch by one octave. ---- -.. _class_SignalSmith_method_process: +.. _class_SoundSmith_method_process: .. rst-class:: classref-method -:ref:`PackedFloat32Array` **process**\ (\ input\: :ref:`PackedFloat32Array`\ ) :ref:`🔗` +:ref:`PackedFloat32Array` **process**\ (\ input\: :ref:`PackedFloat32Array`\ ) :ref:`🔗` Processes a block of interleaved audio samples and returns a new buffer containing the time-stretched and pitch-shifted result. @@ -118,11 +118,11 @@ The effective playback speed is determined by the ratio of input samples to outp ---- -.. _class_SignalSmith_method_reset: +.. _class_SoundSmith_method_reset: .. rst-class:: classref-method -|void| **reset**\ (\ ) :ref:`🔗` +|void| **reset**\ (\ ) :ref:`🔗` Resets the internal processing state. @@ -132,11 +132,11 @@ This should be called when restarting playback or discontinuously changing input ---- -.. _class_SignalSmith_method_set_channels: +.. _class_SoundSmith_method_set_channels: .. rst-class:: classref-method -|void| **set_channels**\ (\ channels\: :ref:`int`\ ) :ref:`🔗` +|void| **set_channels**\ (\ channels\: :ref:`int`\ ) :ref:`🔗` Sets the number of audio channels. @@ -146,11 +146,11 @@ Input and output buffers are expected to be interleaved according to this channe ---- -.. _class_SignalSmith_method_set_pitch: +.. _class_SoundSmith_method_set_pitch: .. rst-class:: classref-method -|void| **set_pitch**\ (\ pitch\: :ref:`float`\ ) :ref:`🔗` +|void| **set_pitch**\ (\ pitch\: :ref:`float`\ ) :ref:`🔗` Sets the pitch transpose factor. @@ -160,11 +160,11 @@ A value of `1.0` leaves pitch unchanged. Values greater than `1.0` raise pitch, ---- -.. _class_SignalSmith_method_set_sample_rate: +.. _class_SoundSmith_method_set_sample_rate: .. rst-class:: classref-method -|void| **set_sample_rate**\ (\ rate\: :ref:`int`\ ) :ref:`🔗` +|void| **set_sample_rate**\ (\ rate\: :ref:`int`\ ) :ref:`🔗` Sets the sample rate, in Hz, used by the internal processing engine. @@ -174,11 +174,11 @@ Changing the sample rate resets the internal state. ---- -.. _class_SignalSmith_method_set_tempo: +.. _class_SoundSmith_method_set_tempo: .. rst-class:: classref-method -|void| **set_tempo**\ (\ tempo\: :ref:`float`\ ) :ref:`🔗` +|void| **set_tempo**\ (\ tempo\: :ref:`float`\ ) :ref:`🔗` Sets the tempo multiplier used during processing. diff --git a/classes/class_splineik3d.rst b/classes/class_splineik3d.rst new file mode 100644 index 00000000000..2927b4e4b67 --- /dev/null +++ b/classes/class_splineik3d.rst @@ -0,0 +1,209 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Redot engine sources. +.. Generator: https://github.com/Redot-Engine/redot-engine/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/Redot-Engine/redot-engine/tree/master/doc/classes/SplineIK3D.xml. + +.. _class_SplineIK3D: + +SplineIK3D +========== + +**Inherits:** :ref:`ChainIK3D` **<** :ref:`IKModifier3D` **<** :ref:`SkeletonModifier3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` + +A :ref:`SkeletonModifier3D` for aligning bones along a :ref:`Path3D`. + +.. rst-class:: classref-introduction-group + +Description +----------- + +A :ref:`SkeletonModifier3D` for aligning bones along a :ref:`Path3D`. The smoothness of the fitting depends on the :ref:`Curve3D.bake_interval`. + +If you want the :ref:`Path3D` to attach to a specific bone, it is recommended to place a :ref:`ModifierBoneTarget3D` before the **SplineIK3D** in the :ref:`SkeletonModifier3D` list (children of the :ref:`Skeleton3D`), and then place a :ref:`Path3D` as the :ref:`ModifierBoneTarget3D`'s child. + +Bone twist is determined based on the :ref:`Curve3D.get_point_tilt()`. + +If the root bone joint and the start point of the :ref:`Curve3D` are separated, it assumes that there is a linear line segment between them. This means that the vector pointing toward the start point of the :ref:`Curve3D` takes precedence over the shortest intersection point along the :ref:`Curve3D`. + +If the end bone joint exceeds the path length, it is bent as close as possible to the end point of the :ref:`Curve3D`. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-----------------------+---------------------------------------------------------------+-------+ + | :ref:`int` | :ref:`setting_count` | ``0`` | + +-----------------------+---------------------------------------------------------------+-------+ + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`NodePath` | :ref:`get_path_3d`\ (\ index\: :ref:`int`\ ) |const| | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_tilt_fade_in`\ (\ index\: :ref:`int`\ ) |const| | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_tilt_fade_out`\ (\ index\: :ref:`int`\ ) |const| | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_tilt_enabled`\ (\ index\: :ref:`int`\ ) |const| | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_path_3d`\ (\ index\: :ref:`int`, path_3d\: :ref:`NodePath`\ ) | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_tilt_enabled`\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_tilt_fade_in`\ (\ index\: :ref:`int`, size\: :ref:`int`\ ) | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_tilt_fade_out`\ (\ index\: :ref:`int`, size\: :ref:`int`\ ) | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_SplineIK3D_property_setting_count: + +.. rst-class:: classref-property + +:ref:`int` **setting_count** = ``0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_setting_count**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_setting_count**\ (\ ) + +The number of settings. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_SplineIK3D_method_get_path_3d: + +.. rst-class:: classref-method + +:ref:`NodePath` **get_path_3d**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the node path of the :ref:`Path3D` which is describing the path. + +.. rst-class:: classref-item-separator + +---- + +.. _class_SplineIK3D_method_get_tilt_fade_in: + +.. rst-class:: classref-method + +:ref:`int` **get_tilt_fade_in**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the tilt interpolation method used between the root bone and the start point of the :ref:`Curve3D` when they are apart. See also :ref:`set_tilt_fade_in()`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_SplineIK3D_method_get_tilt_fade_out: + +.. rst-class:: classref-method + +:ref:`int` **get_tilt_fade_out**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the tilt interpolation method used between the end bone and the end point of the :ref:`Curve3D` when they are apart. See also :ref:`set_tilt_fade_out()`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_SplineIK3D_method_is_tilt_enabled: + +.. rst-class:: classref-method + +:ref:`bool` **is_tilt_enabled**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns if the tilt property of the :ref:`Curve3D` affects the bone twist. + +.. rst-class:: classref-item-separator + +---- + +.. _class_SplineIK3D_method_set_path_3d: + +.. rst-class:: classref-method + +|void| **set_path_3d**\ (\ index\: :ref:`int`, path_3d\: :ref:`NodePath`\ ) :ref:`🔗` + +Sets the node path of the :ref:`Path3D` which is describing the path. + +.. rst-class:: classref-item-separator + +---- + +.. _class_SplineIK3D_method_set_tilt_enabled: + +.. rst-class:: classref-method + +|void| **set_tilt_enabled**\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) :ref:`🔗` + +Sets if the tilt property of the :ref:`Curve3D` should affect the bone twist. + +.. rst-class:: classref-item-separator + +---- + +.. _class_SplineIK3D_method_set_tilt_fade_in: + +.. rst-class:: classref-method + +|void| **set_tilt_fade_in**\ (\ index\: :ref:`int`, size\: :ref:`int`\ ) :ref:`🔗` + +If ``size`` is greater than ``0``, the tilt is interpolated between ``size`` start bones from the start point of the :ref:`Curve3D` when they are apart. + +If ``size`` is equal ``0``, the tilts between the root bone head and the start point of the :ref:`Curve3D` are unified with a tilt of the start point of the :ref:`Curve3D`. + +If ``size`` is less than ``0``, the tilts between the root bone and the start point of the :ref:`Curve3D` are ``0.0``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_SplineIK3D_method_set_tilt_fade_out: + +.. rst-class:: classref-method + +|void| **set_tilt_fade_out**\ (\ index\: :ref:`int`, size\: :ref:`int`\ ) :ref:`🔗` + +If ``size`` is greater than ``0``, the tilt is interpolated between ``size`` end bones from the end point of the :ref:`Curve3D` when they are apart. + +If ``size`` is equal ``0``, the tilts between the end bone tail and the end point of the :ref:`Curve3D` are unified with a tilt of the end point of the :ref:`Curve3D`. + +If ``size`` is less than ``0``, the tilts between the end bone and the end point of the :ref:`Curve3D` are ``0.0``. + +.. |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.)` diff --git a/classes/class_springbonesimulator3d.rst b/classes/class_springbonesimulator3d.rst index db8384b0492..da9063ed237 100644 --- a/classes/class_springbonesimulator3d.rst +++ b/classes/class_springbonesimulator3d.rst @@ -41,11 +41,13 @@ Properties .. table:: :widths: auto - +-------------------------------+----------------------------------------------------------------------------+----------------------+ - | :ref:`Vector3` | :ref:`external_force` | ``Vector3(0, 0, 0)`` | - +-------------------------------+----------------------------------------------------------------------------+----------------------+ - | :ref:`int` | :ref:`setting_count` | ``0`` | - +-------------------------------+----------------------------------------------------------------------------+----------------------+ + +-------------------------------+----------------------------------------------------------------------------------+----------------------+ + | :ref:`Vector3` | :ref:`external_force` | ``Vector3(0, 0, 0)`` | + +-------------------------------+----------------------------------------------------------------------------------+----------------------+ + | :ref:`bool` | :ref:`mutable_bone_axes` | ``true`` | + +-------------------------------+----------------------------------------------------------------------------------+----------------------+ + | :ref:`int` | :ref:`setting_count` | ``0`` | + +-------------------------------+----------------------------------------------------------------------------------+----------------------+ .. rst-class:: classref-reftable-group @@ -55,161 +57,161 @@ Methods .. table:: :widths: auto - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`are_all_child_collisions_enabled`\ (\ index\: :ref:`int`\ ) |const| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`clear_collisions`\ (\ index\: :ref:`int`\ ) | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`clear_exclude_collisions`\ (\ index\: :ref:`int`\ ) | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`clear_settings`\ (\ ) | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_center_bone`\ (\ index\: :ref:`int`\ ) |const| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_center_bone_name`\ (\ index\: :ref:`int`\ ) |const| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`CenterFrom` | :ref:`get_center_from`\ (\ index\: :ref:`int`\ ) |const| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`NodePath` | :ref:`get_center_node`\ (\ index\: :ref:`int`\ ) |const| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_collision_count`\ (\ index\: :ref:`int`\ ) |const| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`NodePath` | :ref:`get_collision_path`\ (\ index\: :ref:`int`, collision\: :ref:`int`\ ) |const| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_drag`\ (\ index\: :ref:`int`\ ) |const| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Curve` | :ref:`get_drag_damping_curve`\ (\ index\: :ref:`int`\ ) |const| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_end_bone`\ (\ index\: :ref:`int`\ ) |const| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`BoneDirection` | :ref:`get_end_bone_direction`\ (\ index\: :ref:`int`\ ) |const| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_end_bone_length`\ (\ index\: :ref:`int`\ ) |const| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_end_bone_name`\ (\ index\: :ref:`int`\ ) |const| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_exclude_collision_count`\ (\ index\: :ref:`int`\ ) |const| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`NodePath` | :ref:`get_exclude_collision_path`\ (\ index\: :ref:`int`, collision\: :ref:`int`\ ) |const| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_gravity`\ (\ index\: :ref:`int`\ ) |const| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Curve` | :ref:`get_gravity_damping_curve`\ (\ index\: :ref:`int`\ ) |const| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`get_gravity_direction`\ (\ index\: :ref:`int`\ ) |const| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_joint_bone`\ (\ index\: :ref:`int`, joint\: :ref:`int`\ ) |const| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_joint_bone_name`\ (\ index\: :ref:`int`, joint\: :ref:`int`\ ) |const| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_joint_count`\ (\ index\: :ref:`int`\ ) |const| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_joint_drag`\ (\ index\: :ref:`int`, joint\: :ref:`int`\ ) |const| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_joint_gravity`\ (\ index\: :ref:`int`, joint\: :ref:`int`\ ) |const| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`get_joint_gravity_direction`\ (\ index\: :ref:`int`, joint\: :ref:`int`\ ) |const| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_joint_radius`\ (\ index\: :ref:`int`, joint\: :ref:`int`\ ) |const| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RotationAxis` | :ref:`get_joint_rotation_axis`\ (\ index\: :ref:`int`, joint\: :ref:`int`\ ) |const| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`get_joint_rotation_axis_vector`\ (\ index\: :ref:`int`, joint\: :ref:`int`\ ) |const| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_joint_stiffness`\ (\ index\: :ref:`int`, joint\: :ref:`int`\ ) |const| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_radius`\ (\ index\: :ref:`int`\ ) |const| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Curve` | :ref:`get_radius_damping_curve`\ (\ index\: :ref:`int`\ ) |const| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_root_bone`\ (\ index\: :ref:`int`\ ) |const| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_root_bone_name`\ (\ index\: :ref:`int`\ ) |const| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RotationAxis` | :ref:`get_rotation_axis`\ (\ index\: :ref:`int`\ ) |const| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`get_rotation_axis_vector`\ (\ index\: :ref:`int`\ ) |const| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_stiffness`\ (\ index\: :ref:`int`\ ) |const| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Curve` | :ref:`get_stiffness_damping_curve`\ (\ index\: :ref:`int`\ ) |const| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_config_individual`\ (\ index\: :ref:`int`\ ) |const| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_end_bone_extended`\ (\ index\: :ref:`int`\ ) |const| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`reset`\ (\ ) | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_center_bone`\ (\ index\: :ref:`int`, bone\: :ref:`int`\ ) | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_center_bone_name`\ (\ index\: :ref:`int`, bone_name\: :ref:`String`\ ) | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_center_from`\ (\ index\: :ref:`int`, center_from\: :ref:`CenterFrom`\ ) | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_center_node`\ (\ index\: :ref:`int`, node_path\: :ref:`NodePath`\ ) | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_collision_count`\ (\ index\: :ref:`int`, count\: :ref:`int`\ ) | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_collision_path`\ (\ index\: :ref:`int`, collision\: :ref:`int`, node_path\: :ref:`NodePath`\ ) | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_drag`\ (\ index\: :ref:`int`, drag\: :ref:`float`\ ) | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_drag_damping_curve`\ (\ index\: :ref:`int`, curve\: :ref:`Curve`\ ) | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_enable_all_child_collisions`\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_end_bone`\ (\ index\: :ref:`int`, bone\: :ref:`int`\ ) | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_end_bone_direction`\ (\ index\: :ref:`int`, bone_direction\: :ref:`BoneDirection`\ ) | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_end_bone_length`\ (\ index\: :ref:`int`, length\: :ref:`float`\ ) | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_end_bone_name`\ (\ index\: :ref:`int`, bone_name\: :ref:`String`\ ) | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_exclude_collision_count`\ (\ index\: :ref:`int`, count\: :ref:`int`\ ) | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_exclude_collision_path`\ (\ index\: :ref:`int`, collision\: :ref:`int`, node_path\: :ref:`NodePath`\ ) | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_extend_end_bone`\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_gravity`\ (\ index\: :ref:`int`, gravity\: :ref:`float`\ ) | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_gravity_damping_curve`\ (\ index\: :ref:`int`, curve\: :ref:`Curve`\ ) | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_gravity_direction`\ (\ index\: :ref:`int`, gravity_direction\: :ref:`Vector3`\ ) | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_individual_config`\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_joint_drag`\ (\ index\: :ref:`int`, joint\: :ref:`int`, drag\: :ref:`float`\ ) | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_joint_gravity`\ (\ index\: :ref:`int`, joint\: :ref:`int`, gravity\: :ref:`float`\ ) | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_joint_gravity_direction`\ (\ index\: :ref:`int`, joint\: :ref:`int`, gravity_direction\: :ref:`Vector3`\ ) | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_joint_radius`\ (\ index\: :ref:`int`, joint\: :ref:`int`, radius\: :ref:`float`\ ) | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_joint_rotation_axis`\ (\ index\: :ref:`int`, joint\: :ref:`int`, axis\: :ref:`RotationAxis`\ ) | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_joint_rotation_axis_vector`\ (\ index\: :ref:`int`, joint\: :ref:`int`, vector\: :ref:`Vector3`\ ) | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_joint_stiffness`\ (\ index\: :ref:`int`, joint\: :ref:`int`, stiffness\: :ref:`float`\ ) | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_radius`\ (\ index\: :ref:`int`, radius\: :ref:`float`\ ) | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_radius_damping_curve`\ (\ index\: :ref:`int`, curve\: :ref:`Curve`\ ) | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_root_bone`\ (\ index\: :ref:`int`, bone\: :ref:`int`\ ) | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_root_bone_name`\ (\ index\: :ref:`int`, bone_name\: :ref:`String`\ ) | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_rotation_axis`\ (\ index\: :ref:`int`, axis\: :ref:`RotationAxis`\ ) | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_rotation_axis_vector`\ (\ index\: :ref:`int`, vector\: :ref:`Vector3`\ ) | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_stiffness`\ (\ index\: :ref:`int`, stiffness\: :ref:`float`\ ) | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_stiffness_damping_curve`\ (\ index\: :ref:`int`, curve\: :ref:`Curve`\ ) | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`are_all_child_collisions_enabled`\ (\ index\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_collisions`\ (\ index\: :ref:`int`\ ) | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_exclude_collisions`\ (\ index\: :ref:`int`\ ) | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_settings`\ (\ ) | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_center_bone`\ (\ index\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_center_bone_name`\ (\ index\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`CenterFrom` | :ref:`get_center_from`\ (\ index\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`NodePath` | :ref:`get_center_node`\ (\ index\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_collision_count`\ (\ index\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`NodePath` | :ref:`get_collision_path`\ (\ index\: :ref:`int`, collision\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_drag`\ (\ index\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Curve` | :ref:`get_drag_damping_curve`\ (\ index\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_end_bone`\ (\ index\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`BoneDirection` | :ref:`get_end_bone_direction`\ (\ index\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_end_bone_length`\ (\ index\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_end_bone_name`\ (\ index\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_exclude_collision_count`\ (\ index\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`NodePath` | :ref:`get_exclude_collision_path`\ (\ index\: :ref:`int`, collision\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_gravity`\ (\ index\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Curve` | :ref:`get_gravity_damping_curve`\ (\ index\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_gravity_direction`\ (\ index\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_joint_bone`\ (\ index\: :ref:`int`, joint\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_joint_bone_name`\ (\ index\: :ref:`int`, joint\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_joint_count`\ (\ index\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_joint_drag`\ (\ index\: :ref:`int`, joint\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_joint_gravity`\ (\ index\: :ref:`int`, joint\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_joint_gravity_direction`\ (\ index\: :ref:`int`, joint\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_joint_radius`\ (\ index\: :ref:`int`, joint\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RotationAxis` | :ref:`get_joint_rotation_axis`\ (\ index\: :ref:`int`, joint\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_joint_rotation_axis_vector`\ (\ index\: :ref:`int`, joint\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_joint_stiffness`\ (\ index\: :ref:`int`, joint\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_radius`\ (\ index\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Curve` | :ref:`get_radius_damping_curve`\ (\ index\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_root_bone`\ (\ index\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_root_bone_name`\ (\ index\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RotationAxis` | :ref:`get_rotation_axis`\ (\ index\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_rotation_axis_vector`\ (\ index\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_stiffness`\ (\ index\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Curve` | :ref:`get_stiffness_damping_curve`\ (\ index\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_config_individual`\ (\ index\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_end_bone_extended`\ (\ index\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`reset`\ (\ ) | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_center_bone`\ (\ index\: :ref:`int`, bone\: :ref:`int`\ ) | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_center_bone_name`\ (\ index\: :ref:`int`, bone_name\: :ref:`String`\ ) | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_center_from`\ (\ index\: :ref:`int`, center_from\: :ref:`CenterFrom`\ ) | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_center_node`\ (\ index\: :ref:`int`, node_path\: :ref:`NodePath`\ ) | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_collision_count`\ (\ index\: :ref:`int`, count\: :ref:`int`\ ) | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_collision_path`\ (\ index\: :ref:`int`, collision\: :ref:`int`, node_path\: :ref:`NodePath`\ ) | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_drag`\ (\ index\: :ref:`int`, drag\: :ref:`float`\ ) | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_drag_damping_curve`\ (\ index\: :ref:`int`, curve\: :ref:`Curve`\ ) | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_enable_all_child_collisions`\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_end_bone`\ (\ index\: :ref:`int`, bone\: :ref:`int`\ ) | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_end_bone_direction`\ (\ index\: :ref:`int`, bone_direction\: :ref:`BoneDirection`\ ) | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_end_bone_length`\ (\ index\: :ref:`int`, length\: :ref:`float`\ ) | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_end_bone_name`\ (\ index\: :ref:`int`, bone_name\: :ref:`String`\ ) | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_exclude_collision_count`\ (\ index\: :ref:`int`, count\: :ref:`int`\ ) | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_exclude_collision_path`\ (\ index\: :ref:`int`, collision\: :ref:`int`, node_path\: :ref:`NodePath`\ ) | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_extend_end_bone`\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_gravity`\ (\ index\: :ref:`int`, gravity\: :ref:`float`\ ) | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_gravity_damping_curve`\ (\ index\: :ref:`int`, curve\: :ref:`Curve`\ ) | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_gravity_direction`\ (\ index\: :ref:`int`, gravity_direction\: :ref:`Vector3`\ ) | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_individual_config`\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_joint_drag`\ (\ index\: :ref:`int`, joint\: :ref:`int`, drag\: :ref:`float`\ ) | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_joint_gravity`\ (\ index\: :ref:`int`, joint\: :ref:`int`, gravity\: :ref:`float`\ ) | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_joint_gravity_direction`\ (\ index\: :ref:`int`, joint\: :ref:`int`, gravity_direction\: :ref:`Vector3`\ ) | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_joint_radius`\ (\ index\: :ref:`int`, joint\: :ref:`int`, radius\: :ref:`float`\ ) | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_joint_rotation_axis`\ (\ index\: :ref:`int`, joint\: :ref:`int`, axis\: :ref:`RotationAxis`\ ) | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_joint_rotation_axis_vector`\ (\ index\: :ref:`int`, joint\: :ref:`int`, vector\: :ref:`Vector3`\ ) | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_joint_stiffness`\ (\ index\: :ref:`int`, joint\: :ref:`int`, stiffness\: :ref:`float`\ ) | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_radius`\ (\ index\: :ref:`int`, radius\: :ref:`float`\ ) | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_radius_damping_curve`\ (\ index\: :ref:`int`, curve\: :ref:`Curve`\ ) | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_root_bone`\ (\ index\: :ref:`int`, bone\: :ref:`int`\ ) | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_root_bone_name`\ (\ index\: :ref:`int`, bone_name\: :ref:`String`\ ) | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_rotation_axis`\ (\ index\: :ref:`int`, axis\: :ref:`RotationAxis`\ ) | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_rotation_axis_vector`\ (\ index\: :ref:`int`, vector\: :ref:`Vector3`\ ) | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_stiffness`\ (\ index\: :ref:`int`, stiffness\: :ref:`float`\ ) | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_stiffness_damping_curve`\ (\ index\: :ref:`int`, curve\: :ref:`Curve`\ ) | + +-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -220,72 +222,6 @@ Methods Enumerations ------------ -.. _enum_SpringBoneSimulator3D_BoneDirection: - -.. rst-class:: classref-enumeration - -enum **BoneDirection**: :ref:`🔗` - -.. _class_SpringBoneSimulator3D_constant_BONE_DIRECTION_PLUS_X: - -.. rst-class:: classref-enumeration-constant - -:ref:`BoneDirection` **BONE_DIRECTION_PLUS_X** = ``0`` - -Enumerated value for the +X axis. - -.. _class_SpringBoneSimulator3D_constant_BONE_DIRECTION_MINUS_X: - -.. rst-class:: classref-enumeration-constant - -:ref:`BoneDirection` **BONE_DIRECTION_MINUS_X** = ``1`` - -Enumerated value for the -X axis. - -.. _class_SpringBoneSimulator3D_constant_BONE_DIRECTION_PLUS_Y: - -.. rst-class:: classref-enumeration-constant - -:ref:`BoneDirection` **BONE_DIRECTION_PLUS_Y** = ``2`` - -Enumerated value for the +Y axis. - -.. _class_SpringBoneSimulator3D_constant_BONE_DIRECTION_MINUS_Y: - -.. rst-class:: classref-enumeration-constant - -:ref:`BoneDirection` **BONE_DIRECTION_MINUS_Y** = ``3`` - -Enumerated value for the -Y axis. - -.. _class_SpringBoneSimulator3D_constant_BONE_DIRECTION_PLUS_Z: - -.. rst-class:: classref-enumeration-constant - -:ref:`BoneDirection` **BONE_DIRECTION_PLUS_Z** = ``4`` - -Enumerated value for the +Z axis. - -.. _class_SpringBoneSimulator3D_constant_BONE_DIRECTION_MINUS_Z: - -.. rst-class:: classref-enumeration-constant - -:ref:`BoneDirection` **BONE_DIRECTION_MINUS_Z** = ``5`` - -Enumerated value for the -Z axis. - -.. _class_SpringBoneSimulator3D_constant_BONE_DIRECTION_FROM_PARENT: - -.. rst-class:: classref-enumeration-constant - -:ref:`BoneDirection` **BONE_DIRECTION_FROM_PARENT** = ``6`` - -Enumerated value for the axis from a parent bone to the child bone. - -.. rst-class:: classref-item-separator - ----- - .. _enum_SpringBoneSimulator3D_CenterFrom: .. rst-class:: classref-enumeration @@ -320,56 +256,6 @@ The bone pose origin of the parent :ref:`Skeleton3D` specified If :ref:`Node3D` is not found, the parent :ref:`Skeleton3D` is treated as center. -.. rst-class:: classref-item-separator - ----- - -.. _enum_SpringBoneSimulator3D_RotationAxis: - -.. rst-class:: classref-enumeration - -enum **RotationAxis**: :ref:`🔗` - -.. _class_SpringBoneSimulator3D_constant_ROTATION_AXIS_X: - -.. rst-class:: classref-enumeration-constant - -:ref:`RotationAxis` **ROTATION_AXIS_X** = ``0`` - -Enumerated value for the rotation of the X axis. - -.. _class_SpringBoneSimulator3D_constant_ROTATION_AXIS_Y: - -.. rst-class:: classref-enumeration-constant - -:ref:`RotationAxis` **ROTATION_AXIS_Y** = ``1`` - -Enumerated value for the rotation of the Y axis. - -.. _class_SpringBoneSimulator3D_constant_ROTATION_AXIS_Z: - -.. rst-class:: classref-enumeration-constant - -:ref:`RotationAxis` **ROTATION_AXIS_Z** = ``2`` - -Enumerated value for the rotation of the Z axis. - -.. _class_SpringBoneSimulator3D_constant_ROTATION_AXIS_ALL: - -.. rst-class:: classref-enumeration-constant - -:ref:`RotationAxis` **ROTATION_AXIS_ALL** = ``3`` - -Enumerated value for the unconstrained rotation. - -.. _class_SpringBoneSimulator3D_constant_ROTATION_AXIS_CUSTOM: - -.. rst-class:: classref-enumeration-constant - -:ref:`RotationAxis` **ROTATION_AXIS_CUSTOM** = ``4`` - -Enumerated value for an optional rotation axis. See also :ref:`set_joint_rotation_axis_vector()`. - .. rst-class:: classref-section-separator ---- @@ -398,6 +284,25 @@ This is useful for effects such as wind and anti-gravity. ---- +.. _class_SpringBoneSimulator3D_property_mutable_bone_axes: + +.. rst-class:: classref-property + +:ref:`bool` **mutable_bone_axes** = ``true`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_mutable_bone_axes**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **are_bone_axes_mutable**\ (\ ) + +If ``true``, the solver retrieves the bone axis from the bone pose every frame. + +If ``false``, the solver retrieves the bone axis from the bone rest and caches it, which increases performance slightly, but position changes in the bone pose made before processing this **SpringBoneSimulator3D** are ignored. + +.. rst-class:: classref-item-separator + +---- + .. _class_SpringBoneSimulator3D_property_setting_count: .. rst-class:: classref-property @@ -580,9 +485,9 @@ Returns the end bone index of the bone chain. .. rst-class:: classref-method -:ref:`BoneDirection` **get_end_bone_direction**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` +:ref:`BoneDirection` **get_end_bone_direction**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` -Returns the end bone's tail direction of the bone chain when :ref:`is_end_bone_extended()` is ``true``. +Returns the tail direction of the end bone of the bone chain when :ref:`is_end_bone_extended()` is ``true``. .. rst-class:: classref-item-separator @@ -594,7 +499,7 @@ Returns the end bone's tail direction of the bone chain when :ref:`is_end_bone_e :ref:`float` **get_end_bone_length**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` -Returns the end bone's tail length of the bone chain when :ref:`is_end_bone_extended()` is ``true``. +Returns the end bone tail length of the bone chain when :ref:`is_end_bone_extended()` is ``true``. .. rst-class:: classref-item-separator @@ -760,7 +665,7 @@ Returns the radius at ``joint`` in the bone chain's joint list. .. rst-class:: classref-method -:ref:`RotationAxis` **get_joint_rotation_axis**\ (\ index\: :ref:`int`, joint\: :ref:`int`\ ) |const| :ref:`🔗` +:ref:`RotationAxis` **get_joint_rotation_axis**\ (\ index\: :ref:`int`, joint\: :ref:`int`\ ) |const| :ref:`🔗` Returns the rotation axis at ``joint`` in the bone chain's joint list. @@ -776,7 +681,7 @@ Returns the rotation axis at ``joint`` in the bone chain's joint list. Returns the rotation axis vector for the specified joint in the bone chain. This vector represents the axis around which the joint can rotate. It is determined based on the rotation axis set for the joint. -If :ref:`get_joint_rotation_axis()` is :ref:`ROTATION_AXIS_ALL`, this method returns ``Vector3(0, 0, 0)``. +If :ref:`get_joint_rotation_axis()` is :ref:`SkeletonModifier3D.ROTATION_AXIS_ALL`, this method returns ``Vector3(0, 0, 0)``. .. rst-class:: classref-item-separator @@ -846,7 +751,7 @@ Returns the root bone name of the bone chain. .. rst-class:: classref-method -:ref:`RotationAxis` **get_rotation_axis**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` +:ref:`RotationAxis` **get_rotation_axis**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` Returns the rotation axis of the bone chain. @@ -862,7 +767,7 @@ Returns the rotation axis of the bone chain. Returns the rotation axis vector of the bone chain. This vector represents the axis around which the bone chain can rotate. It is determined based on the rotation axis set for the bone chain. -If :ref:`get_rotation_axis()` is :ref:`ROTATION_AXIS_ALL`, this method returns ``Vector3(0, 0, 0)``. +If :ref:`get_rotation_axis()` is :ref:`SkeletonModifier3D.ROTATION_AXIS_ALL`, this method returns ``Vector3(0, 0, 0)``. .. rst-class:: classref-item-separator @@ -910,7 +815,7 @@ Returns ``true`` if the config can be edited individually for each joint. :ref:`bool` **is_end_bone_extended**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` -Returns ``true`` if the end bone is extended to have the tail. +Returns ``true`` if the end bone is extended to have a tail. .. rst-class:: classref-item-separator @@ -1064,7 +969,7 @@ Sets the end bone index of the bone chain. .. rst-class:: classref-method -|void| **set_end_bone_direction**\ (\ index\: :ref:`int`, bone_direction\: :ref:`BoneDirection`\ ) :ref:`🔗` +|void| **set_end_bone_direction**\ (\ index\: :ref:`int`, bone_direction\: :ref:`BoneDirection`\ ) :ref:`🔗` Sets the end bone tail direction of the bone chain when :ref:`is_end_bone_extended()` is ``true``. @@ -1128,11 +1033,9 @@ Sets the node path of the :ref:`SpringBoneCollision3D`, enabled\: :ref:`bool`\ ) :ref:`🔗` -If ``enabled`` is ``true``, the end bone is extended to have the tail. - -The extended tail config is allocated to the last element in the joint list. +If ``enabled`` is ``true``, the end bone is extended to have a tail. -In other words, if you set ``enabled`` is ``false``, the config of last element in the joint list has no effect in the simulated result. +The extended tail config is allocated to the last element in the joint list. In other words, if you set ``enabled`` to ``false``, the config of the last element in the joint list has no effect in the simulated result. .. rst-class:: classref-item-separator @@ -1244,11 +1147,11 @@ Sets the joint radius at ``joint`` in the bone chain's joint list when :ref:`is_ .. rst-class:: classref-method -|void| **set_joint_rotation_axis**\ (\ index\: :ref:`int`, joint\: :ref:`int`, axis\: :ref:`RotationAxis`\ ) :ref:`🔗` +|void| **set_joint_rotation_axis**\ (\ index\: :ref:`int`, joint\: :ref:`int`, axis\: :ref:`RotationAxis`\ ) :ref:`🔗` Sets the rotation axis at ``joint`` in the bone chain's joint list when :ref:`is_config_individual()` is ``true``. -The axes are based on the :ref:`Skeleton3D.get_bone_rest()`'s space, if ``axis`` is :ref:`ROTATION_AXIS_CUSTOM`, you can specify any axis. +The axes are based on the :ref:`Skeleton3D.get_bone_rest()`'s space, if ``axis`` is :ref:`SkeletonModifier3D.ROTATION_AXIS_CUSTOM`, you can specify any axis. \ **Note:** The rotation axis and the forward vector shouldn't be colinear to avoid unintended rotation since **SpringBoneSimulator3D** does not factor in twisting forces. @@ -1266,7 +1169,7 @@ Sets the rotation axis vector for the specified joint in the bone chain. This vector is normalized by an internal process and represents the axis around which the bone chain can rotate. -If the vector length is ``0``, it is considered synonymous with :ref:`ROTATION_AXIS_ALL`. +If the vector length is ``0``, it is considered synonymous with :ref:`SkeletonModifier3D.ROTATION_AXIS_ALL`. .. rst-class:: classref-item-separator @@ -1338,11 +1241,11 @@ Sets the root bone name of the bone chain. .. rst-class:: classref-method -|void| **set_rotation_axis**\ (\ index\: :ref:`int`, axis\: :ref:`RotationAxis`\ ) :ref:`🔗` +|void| **set_rotation_axis**\ (\ index\: :ref:`int`, axis\: :ref:`RotationAxis`\ ) :ref:`🔗` Sets the rotation axis of the bone chain. If set to a specific axis, it acts like a hinge joint. The value is cached in each joint setting in the joint list. -The axes are based on the :ref:`Skeleton3D.get_bone_rest()`'s space, if ``axis`` is :ref:`ROTATION_AXIS_CUSTOM`, you can specify any axis. +The axes are based on the :ref:`Skeleton3D.get_bone_rest()`'s space, if ``axis`` is :ref:`SkeletonModifier3D.ROTATION_AXIS_CUSTOM`, you can specify any axis. \ **Note:** The rotation axis vector and the forward vector shouldn't be colinear to avoid unintended rotation since **SpringBoneSimulator3D** does not factor in twisting forces. @@ -1360,7 +1263,7 @@ Sets the rotation axis vector of the bone chain. The value is cached in each joi This vector is normalized by an internal process and represents the axis around which the bone chain can rotate. -If the vector length is ``0``, it is considered synonymous with :ref:`ROTATION_AXIS_ALL`. +If the vector length is ``0``, it is considered synonymous with :ref:`SkeletonModifier3D.ROTATION_AXIS_ALL`. .. rst-class:: classref-item-separator diff --git a/classes/class_sprite2d.rst b/classes/class_sprite2d.rst index a4167a91a04..242f1000664 100644 --- a/classes/class_sprite2d.rst +++ b/classes/class_sprite2d.rst @@ -12,6 +12,8 @@ Sprite2D **Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**Inherited By:** :ref:`Mode7Sprite2D` + General-purpose sprite node. .. rst-class:: classref-introduction-group diff --git a/classes/class_struct.rst b/classes/class_struct.rst new file mode 100644 index 00000000000..0aaf760c606 --- /dev/null +++ b/classes/class_struct.rst @@ -0,0 +1,132 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Redot engine sources. +.. Generator: https://github.com/Redot-Engine/redot-engine/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/Redot-Engine/redot-engine/tree/master/doc/classes/Struct.xml. + +.. _class_Struct: + +Struct +====== + +A schema-backed container of named, typed fields with value semantics. + +.. rst-class:: classref-introduction-group + +Description +----------- + +**Struct** is a fixed-layout container whose fields are described by a shared schema (name, type, and optional default per field). Unlike :ref:`Dictionary`, a struct has value semantics: copying a struct copies its field values, and two structs compare equal when they share the same field layout and all field values are equal. + +Fields are accessed by name (a :ref:`StringName` or :ref:`String`) or by integer index through the ``[]`` operator. Values assigned to a field are validated against the schema and coerced to the field's declared type; incompatible values are rejected. + +\ **Note:** The schema itself is created and managed internally; structs are typically obtained from typed APIs or from GDScript ``struct`` declarations rather than constructed field-by-field from script. + +.. rst-class:: classref-reftable-group + +Constructors +------------ + +.. table:: + :widths: auto + + +-----------------------------+------------------------------------------------------------------------------------------+ + | :ref:`Struct` | :ref:`Struct`\ (\ ) | + +-----------------------------+------------------------------------------------------------------------------------------+ + | :ref:`Struct` | :ref:`Struct`\ (\ from\: :ref:`Struct`\ ) | + +-----------------------------+------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group + +Operators +--------- + +.. table:: + :widths: auto + + +-------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator !=`\ (\ right\: :ref:`Struct`\ ) | + +-------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator ==`\ (\ right\: :ref:`Struct`\ ) | + +-------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`operator []`\ (\ key\: :ref:`Variant`\ ) | + +-------------------------------+--------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Constructor Descriptions +------------------------ + +.. _class_Struct_constructor_Struct: + +.. rst-class:: classref-constructor + +:ref:`Struct` **Struct**\ (\ ) :ref:`🔗` + +Constructs an empty **Struct** with no schema (a null struct). + +.. rst-class:: classref-item-separator + +---- + +.. rst-class:: classref-constructor + +:ref:`Struct` **Struct**\ (\ from\: :ref:`Struct`\ ) + +Constructs a **Struct** as a copy of ``from``, duplicating its schema reference and field values. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Operator Descriptions +--------------------- + +.. _class_Struct_operator_neq_Struct: + +.. rst-class:: classref-operator + +:ref:`bool` **operator !=**\ (\ right\: :ref:`Struct`\ ) :ref:`🔗` + +Returns ``true`` if the two structs are not equal, that is, if they have a different field layout or any field value differs. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Struct_operator_eq_Struct: + +.. rst-class:: classref-operator + +:ref:`bool` **operator ==**\ (\ right\: :ref:`Struct`\ ) :ref:`🔗` + +Returns ``true`` if the two structs are equal. Structs are equal when they share the same field layout and all corresponding field values compare equal; structs with different layouts are never equal. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Struct_operator_idx_Variant: + +.. rst-class:: classref-operator + +:ref:`Variant` **operator []**\ (\ key\: :ref:`Variant`\ ) :ref:`🔗` + +Accesses a struct field. The key may be the field name (a :ref:`StringName` or :ref:`String`) or the integer field index. Assignment is validated against the struct's schema: incompatible values are rejected, and accepted values are coerced to the field's declared type. + +.. |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.)` diff --git a/classes/class_tree.rst b/classes/class_tree.rst index 702fbebc589..caeb28c73f5 100644 --- a/classes/class_tree.rst +++ b/classes/class_tree.rst @@ -711,6 +711,8 @@ If ``true``, column titles are visible. The number of columns. +Prints an error and does not allow setting the columns during mouse selection. + .. rst-class:: classref-item-separator ---- @@ -849,6 +851,8 @@ Method Descriptions Clears the tree. This removes all items. +Prints an error and does not allow clearing the tree if called during mouse selection. + .. rst-class:: classref-item-separator ---- @@ -865,6 +869,8 @@ If ``parent`` is ``null``, the root item will be the parent, or the new item wil The new item will be the ``index``-th child of parent, or it will be the last child if there are not enough siblings. +Prints an error and returns ``null`` if called during mouse selection, or if the ``parent`` does not belong to this tree. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_twoboneik3d.rst b/classes/class_twoboneik3d.rst new file mode 100644 index 00000000000..c207cb06914 --- /dev/null +++ b/classes/class_twoboneik3d.rst @@ -0,0 +1,491 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Redot engine sources. +.. Generator: https://github.com/Redot-Engine/redot-engine/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/Redot-Engine/redot-engine/tree/master/doc/classes/TwoBoneIK3D.xml. + +.. _class_TwoBoneIK3D: + +TwoBoneIK3D +=========== + +**Inherits:** :ref:`IKModifier3D` **<** :ref:`SkeletonModifier3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` + +Rotation based intersection of two circles inverse kinematics solver. + +.. rst-class:: classref-introduction-group + +Description +----------- + +This :ref:`IKModifier3D` requires a pole target. It provides deterministic results by constructing a plane from each joint and pole target and finding the intersection of two circles (disks in 3D). + +This IK can handle twist by setting the pole direction. If there are more than one bone between each set bone, their rotations are ignored, and the straight line connecting the root-middle and middle-end joints are treated as virtual bones. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-----------------------+----------------------------------------------------------------+-------+ + | :ref:`int` | :ref:`setting_count` | ``0`` | + +-----------------------+----------------------------------------------------------------+-------+ + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_end_bone`\ (\ index\: :ref:`int`\ ) |const| | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`BoneDirection` | :ref:`get_end_bone_direction`\ (\ index\: :ref:`int`\ ) |const| | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_end_bone_length`\ (\ index\: :ref:`int`\ ) |const| | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_end_bone_name`\ (\ index\: :ref:`int`\ ) |const| | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_middle_bone`\ (\ index\: :ref:`int`\ ) |const| | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_middle_bone_name`\ (\ index\: :ref:`int`\ ) |const| | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`SecondaryDirection` | :ref:`get_pole_direction`\ (\ index\: :ref:`int`\ ) |const| | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_pole_direction_vector`\ (\ index\: :ref:`int`\ ) |const| | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`NodePath` | :ref:`get_pole_node`\ (\ index\: :ref:`int`\ ) |const| | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_root_bone`\ (\ index\: :ref:`int`\ ) |const| | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_root_bone_name`\ (\ index\: :ref:`int`\ ) |const| | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`NodePath` | :ref:`get_target_node`\ (\ index\: :ref:`int`\ ) |const| | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_end_bone_extended`\ (\ index\: :ref:`int`\ ) |const| | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_using_virtual_end`\ (\ index\: :ref:`int`\ ) |const| | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_end_bone`\ (\ index\: :ref:`int`, bone\: :ref:`int`\ ) | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_end_bone_direction`\ (\ index\: :ref:`int`, bone_direction\: :ref:`BoneDirection`\ ) | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_end_bone_length`\ (\ index\: :ref:`int`, length\: :ref:`float`\ ) | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_end_bone_name`\ (\ index\: :ref:`int`, bone_name\: :ref:`String`\ ) | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_extend_end_bone`\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_middle_bone`\ (\ index\: :ref:`int`, bone\: :ref:`int`\ ) | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_middle_bone_name`\ (\ index\: :ref:`int`, bone_name\: :ref:`String`\ ) | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_pole_direction`\ (\ index\: :ref:`int`, direction\: :ref:`SecondaryDirection`\ ) | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_pole_direction_vector`\ (\ index\: :ref:`int`, vector\: :ref:`Vector3`\ ) | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_pole_node`\ (\ index\: :ref:`int`, pole_node\: :ref:`NodePath`\ ) | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_root_bone`\ (\ index\: :ref:`int`, bone\: :ref:`int`\ ) | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_root_bone_name`\ (\ index\: :ref:`int`, bone_name\: :ref:`String`\ ) | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_target_node`\ (\ index\: :ref:`int`, target_node\: :ref:`NodePath`\ ) | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_use_virtual_end`\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_TwoBoneIK3D_property_setting_count: + +.. rst-class:: classref-property + +:ref:`int` **setting_count** = ``0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_setting_count**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_setting_count**\ (\ ) + +The number of settings. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_TwoBoneIK3D_method_get_end_bone: + +.. rst-class:: classref-method + +:ref:`int` **get_end_bone**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the end bone index. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TwoBoneIK3D_method_get_end_bone_direction: + +.. rst-class:: classref-method + +:ref:`BoneDirection` **get_end_bone_direction**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the end bone's tail direction when :ref:`is_end_bone_extended()` is ``true``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TwoBoneIK3D_method_get_end_bone_length: + +.. rst-class:: classref-method + +:ref:`float` **get_end_bone_length**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the end bone tail length of the bone chain when :ref:`is_end_bone_extended()` is ``true``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TwoBoneIK3D_method_get_end_bone_name: + +.. rst-class:: classref-method + +:ref:`String` **get_end_bone_name**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the end bone name. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TwoBoneIK3D_method_get_middle_bone: + +.. rst-class:: classref-method + +:ref:`int` **get_middle_bone**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the middle bone index. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TwoBoneIK3D_method_get_middle_bone_name: + +.. rst-class:: classref-method + +:ref:`String` **get_middle_bone_name**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the middle bone name. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TwoBoneIK3D_method_get_pole_direction: + +.. rst-class:: classref-method + +:ref:`SecondaryDirection` **get_pole_direction**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the pole direction. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TwoBoneIK3D_method_get_pole_direction_vector: + +.. rst-class:: classref-method + +:ref:`Vector3` **get_pole_direction_vector**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the pole direction vector. + +If :ref:`get_pole_direction()` is :ref:`SkeletonModifier3D.SECONDARY_DIRECTION_NONE`, this method returns ``Vector3(0, 0, 0)``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TwoBoneIK3D_method_get_pole_node: + +.. rst-class:: classref-method + +:ref:`NodePath` **get_pole_node**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the pole target node that constructs a plane which the joints are all on and the pole is trying to direct. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TwoBoneIK3D_method_get_root_bone: + +.. rst-class:: classref-method + +:ref:`int` **get_root_bone**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the root bone index. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TwoBoneIK3D_method_get_root_bone_name: + +.. rst-class:: classref-method + +:ref:`String` **get_root_bone_name**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the root bone name. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TwoBoneIK3D_method_get_target_node: + +.. rst-class:: classref-method + +:ref:`NodePath` **get_target_node**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the target node that the end bone is trying to reach. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TwoBoneIK3D_method_is_end_bone_extended: + +.. rst-class:: classref-method + +:ref:`bool` **is_end_bone_extended**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns ``true`` if the end bone is extended to have a tail. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TwoBoneIK3D_method_is_using_virtual_end: + +.. rst-class:: classref-method + +:ref:`bool` **is_using_virtual_end**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns ``true`` if the end bone is extended from the middle bone as a virtual bone. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TwoBoneIK3D_method_set_end_bone: + +.. rst-class:: classref-method + +|void| **set_end_bone**\ (\ index\: :ref:`int`, bone\: :ref:`int`\ ) :ref:`🔗` + +Sets the end bone index. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TwoBoneIK3D_method_set_end_bone_direction: + +.. rst-class:: classref-method + +|void| **set_end_bone_direction**\ (\ index\: :ref:`int`, bone_direction\: :ref:`BoneDirection`\ ) :ref:`🔗` + +Sets the end bone tail direction when :ref:`is_end_bone_extended()` is ``true``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TwoBoneIK3D_method_set_end_bone_length: + +.. rst-class:: classref-method + +|void| **set_end_bone_length**\ (\ index\: :ref:`int`, length\: :ref:`float`\ ) :ref:`🔗` + +Sets the end bone tail length when :ref:`is_end_bone_extended()` is ``true``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TwoBoneIK3D_method_set_end_bone_name: + +.. rst-class:: classref-method + +|void| **set_end_bone_name**\ (\ index\: :ref:`int`, bone_name\: :ref:`String`\ ) :ref:`🔗` + +Sets the end bone name. + +\ **Note:** The end bone must be a child of the middle bone. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TwoBoneIK3D_method_set_extend_end_bone: + +.. rst-class:: classref-method + +|void| **set_extend_end_bone**\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) :ref:`🔗` + +If ``enabled`` is ``true``, the end bone is extended to have a tail. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TwoBoneIK3D_method_set_middle_bone: + +.. rst-class:: classref-method + +|void| **set_middle_bone**\ (\ index\: :ref:`int`, bone\: :ref:`int`\ ) :ref:`🔗` + +Sets the middle bone index. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TwoBoneIK3D_method_set_middle_bone_name: + +.. rst-class:: classref-method + +|void| **set_middle_bone_name**\ (\ index\: :ref:`int`, bone_name\: :ref:`String`\ ) :ref:`🔗` + +Sets the middle bone name. + +\ **Note:** The middle bone must be a child of the root bone. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TwoBoneIK3D_method_set_pole_direction: + +.. rst-class:: classref-method + +|void| **set_pole_direction**\ (\ index\: :ref:`int`, direction\: :ref:`SecondaryDirection`\ ) :ref:`🔗` + +Sets the pole direction. + +The pole is on the middle bone and will direct to the pole target. + +The rotation axis is a vector that is orthogonal to this and the forward vector. + +\ **Note:** The pole direction and the forward vector shouldn't be colinear to avoid unintended rotation. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TwoBoneIK3D_method_set_pole_direction_vector: + +.. rst-class:: classref-method + +|void| **set_pole_direction_vector**\ (\ index\: :ref:`int`, vector\: :ref:`Vector3`\ ) :ref:`🔗` + +Sets the pole direction vector. + +This vector is normalized by an internal process. + +If the vector length is ``0``, it is considered synonymous with :ref:`SkeletonModifier3D.SECONDARY_DIRECTION_NONE`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TwoBoneIK3D_method_set_pole_node: + +.. rst-class:: classref-method + +|void| **set_pole_node**\ (\ index\: :ref:`int`, pole_node\: :ref:`NodePath`\ ) :ref:`🔗` + +Sets the pole target node that constructs a plane which the joints are all on and the pole is trying to direct. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TwoBoneIK3D_method_set_root_bone: + +.. rst-class:: classref-method + +|void| **set_root_bone**\ (\ index\: :ref:`int`, bone\: :ref:`int`\ ) :ref:`🔗` + +Sets the root bone index. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TwoBoneIK3D_method_set_root_bone_name: + +.. rst-class:: classref-method + +|void| **set_root_bone_name**\ (\ index\: :ref:`int`, bone_name\: :ref:`String`\ ) :ref:`🔗` + +Sets the root bone name. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TwoBoneIK3D_method_set_target_node: + +.. rst-class:: classref-method + +|void| **set_target_node**\ (\ index\: :ref:`int`, target_node\: :ref:`NodePath`\ ) :ref:`🔗` + +Sets the target node that the end bone is trying to reach. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TwoBoneIK3D_method_set_use_virtual_end: + +.. rst-class:: classref-method + +|void| **set_use_virtual_end**\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) :ref:`🔗` + +If ``enabled`` is ``true``, the end bone is extended from the middle bone as a virtual bone. + +.. |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.)` diff --git a/classes/class_vector2.rst b/classes/class_vector2.rst index a45cf7d9d68..b46fcdc83c8 100644 --- a/classes/class_vector2.rst +++ b/classes/class_vector2.rst @@ -82,103 +82,107 @@ Methods .. table:: :widths: auto - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`abs`\ (\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`angle`\ (\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`angle_to`\ (\ to\: :ref:`Vector2`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`angle_to_point`\ (\ to\: :ref:`Vector2`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`aspect`\ (\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`bezier_derivative`\ (\ control_1\: :ref:`Vector2`, control_2\: :ref:`Vector2`, end\: :ref:`Vector2`, t\: :ref:`float`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`bezier_interpolate`\ (\ control_1\: :ref:`Vector2`, control_2\: :ref:`Vector2`, end\: :ref:`Vector2`, t\: :ref:`float`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`bounce`\ (\ n\: :ref:`Vector2`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`ceil`\ (\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`clamp`\ (\ min\: :ref:`Vector2`, max\: :ref:`Vector2`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`clampf`\ (\ min\: :ref:`float`, max\: :ref:`float`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`cross`\ (\ with\: :ref:`Vector2`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`cubic_interpolate`\ (\ b\: :ref:`Vector2`, pre_a\: :ref:`Vector2`, post_b\: :ref:`Vector2`, weight\: :ref:`float`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`cubic_interpolate_in_time`\ (\ b\: :ref:`Vector2`, pre_a\: :ref:`Vector2`, post_b\: :ref:`Vector2`, weight\: :ref:`float`, b_t\: :ref:`float`, pre_a_t\: :ref:`float`, post_b_t\: :ref:`float`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`direction_to`\ (\ to\: :ref:`Vector2`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`distance_squared_to`\ (\ to\: :ref:`Vector2`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`distance_to`\ (\ to\: :ref:`Vector2`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`dot`\ (\ with\: :ref:`Vector2`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`floor`\ (\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`from_angle`\ (\ angle\: :ref:`float`\ ) |static| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_equal_approx`\ (\ to\: :ref:`Vector2`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_finite`\ (\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_normalized`\ (\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_zero_approx`\ (\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`length`\ (\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`length_squared`\ (\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`lerp`\ (\ to\: :ref:`Vector2`, weight\: :ref:`float`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`limit_length`\ (\ length\: :ref:`float` = 1.0\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`max`\ (\ with\: :ref:`Vector2`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`max_axis_index`\ (\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`maxf`\ (\ with\: :ref:`float`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`min`\ (\ with\: :ref:`Vector2`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`min_axis_index`\ (\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`minf`\ (\ with\: :ref:`float`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`move_toward`\ (\ to\: :ref:`Vector2`, delta\: :ref:`float`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`normalized`\ (\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`orthogonal`\ (\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`posmod`\ (\ mod\: :ref:`float`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`posmodv`\ (\ modv\: :ref:`Vector2`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`project`\ (\ b\: :ref:`Vector2`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`reflect`\ (\ line\: :ref:`Vector2`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`rotated`\ (\ angle\: :ref:`float`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`round`\ (\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`sign`\ (\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`slerp`\ (\ to\: :ref:`Vector2`, weight\: :ref:`float`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`slide`\ (\ n\: :ref:`Vector2`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`snapped`\ (\ step\: :ref:`Vector2`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`snappedf`\ (\ step\: :ref:`float`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`abs`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`angle`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`angle_to`\ (\ to\: :ref:`Vector2`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`angle_to_point`\ (\ to\: :ref:`Vector2`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`aspect`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`bezier_derivative`\ (\ control_1\: :ref:`Vector2`, control_2\: :ref:`Vector2`, end\: :ref:`Vector2`, t\: :ref:`float`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`bezier_interpolate`\ (\ control_1\: :ref:`Vector2`, control_2\: :ref:`Vector2`, end\: :ref:`Vector2`, t\: :ref:`float`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`bounce`\ (\ n\: :ref:`Vector2`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`ceil`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`clamp`\ (\ min\: :ref:`Vector2`, max\: :ref:`Vector2`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`clampf`\ (\ min\: :ref:`float`, max\: :ref:`float`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`cross`\ (\ with\: :ref:`Vector2`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`cubic_interpolate`\ (\ b\: :ref:`Vector2`, pre_a\: :ref:`Vector2`, post_b\: :ref:`Vector2`, weight\: :ref:`float`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`cubic_interpolate_in_time`\ (\ b\: :ref:`Vector2`, pre_a\: :ref:`Vector2`, post_b\: :ref:`Vector2`, weight\: :ref:`float`, b_t\: :ref:`float`, pre_a_t\: :ref:`float`, post_b_t\: :ref:`float`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`direction_to`\ (\ to\: :ref:`Vector2`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`distance_squared_to`\ (\ to\: :ref:`Vector2`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`distance_to`\ (\ to\: :ref:`Vector2`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`dot`\ (\ with\: :ref:`Vector2`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`floor`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`from_angle`\ (\ angle\: :ref:`float`\ ) |static| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_equal_approx`\ (\ to\: :ref:`Vector2`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_finite`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_normalized`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_zero_approx`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`length`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`length_squared`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`lerp`\ (\ to\: :ref:`Vector2`, weight\: :ref:`float`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`limit_length`\ (\ length\: :ref:`float` = 1.0\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`max`\ (\ with\: :ref:`Vector2`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`max_axis_index`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`maxf`\ (\ with\: :ref:`float`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`min`\ (\ with\: :ref:`Vector2`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`min_axis_index`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`minf`\ (\ with\: :ref:`float`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`monotonic_cubic_interpolate`\ (\ b\: :ref:`Vector2`, pre_a\: :ref:`Vector2`, post_b\: :ref:`Vector2`, weight\: :ref:`float`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`monotonic_cubic_interpolate_in_time`\ (\ b\: :ref:`Vector2`, pre_a\: :ref:`Vector2`, post_b\: :ref:`Vector2`, weight\: :ref:`float`, b_t\: :ref:`float`, pre_a_t\: :ref:`float`, post_b_t\: :ref:`float`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`move_toward`\ (\ to\: :ref:`Vector2`, delta\: :ref:`float`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`normalized`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`orthogonal`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`posmod`\ (\ mod\: :ref:`float`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`posmodv`\ (\ modv\: :ref:`Vector2`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`project`\ (\ b\: :ref:`Vector2`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`reflect`\ (\ line\: :ref:`Vector2`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`rotated`\ (\ angle\: :ref:`float`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`round`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`sign`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`slerp`\ (\ to\: :ref:`Vector2`, weight\: :ref:`float`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`slide`\ (\ n\: :ref:`Vector2`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`snapped`\ (\ step\: :ref:`Vector2`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`snappedf`\ (\ step\: :ref:`float`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -855,6 +859,32 @@ Returns the component-wise minimum of this and ``with``, equivalent to ``Vector2 ---- +.. _class_Vector2_method_monotonic_cubic_interpolate: + +.. rst-class:: classref-method + +:ref:`Vector2` **monotonic_cubic_interpolate**\ (\ b\: :ref:`Vector2`, pre_a\: :ref:`Vector2`, post_b\: :ref:`Vector2`, weight\: :ref:`float`\ ) |const| :ref:`🔗` + +Performs a monotonic cubic interpolation between this vector and ``b`` using ``pre_a`` and ``post_b`` as handles, and returns the result at position ``weight``. ``weight`` is on the range of 0.0 to 1.0, representing the amount of interpolation. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Vector2_method_monotonic_cubic_interpolate_in_time: + +.. rst-class:: classref-method + +:ref:`Vector2` **monotonic_cubic_interpolate_in_time**\ (\ b\: :ref:`Vector2`, pre_a\: :ref:`Vector2`, post_b\: :ref:`Vector2`, weight\: :ref:`float`, b_t\: :ref:`float`, pre_a_t\: :ref:`float`, post_b_t\: :ref:`float`\ ) |const| :ref:`🔗` + +Performs a monotonic cubic interpolation between this vector and ``b`` using ``pre_a`` and ``post_b`` as handles, and returns the result at position ``weight``. ``weight`` is on the range of 0.0 to 1.0, representing the amount of interpolation. + +It can perform smoother interpolation than :ref:`monotonic_cubic_interpolate()` by the time values. + +.. rst-class:: classref-item-separator + +---- + .. _class_Vector2_method_move_toward: .. rst-class:: classref-method diff --git a/classes/class_vector3.rst b/classes/class_vector3.rst index 6e4b7c7f264..0a812dac32a 100644 --- a/classes/class_vector3.rst +++ b/classes/class_vector3.rst @@ -84,103 +84,107 @@ Methods .. table:: :widths: auto - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`abs`\ (\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`angle_to`\ (\ to\: :ref:`Vector3`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`bezier_derivative`\ (\ control_1\: :ref:`Vector3`, control_2\: :ref:`Vector3`, end\: :ref:`Vector3`, t\: :ref:`float`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`bezier_interpolate`\ (\ control_1\: :ref:`Vector3`, control_2\: :ref:`Vector3`, end\: :ref:`Vector3`, t\: :ref:`float`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`bounce`\ (\ n\: :ref:`Vector3`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`ceil`\ (\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`clamp`\ (\ min\: :ref:`Vector3`, max\: :ref:`Vector3`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`clampf`\ (\ min\: :ref:`float`, max\: :ref:`float`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`cross`\ (\ with\: :ref:`Vector3`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`cubic_interpolate`\ (\ b\: :ref:`Vector3`, pre_a\: :ref:`Vector3`, post_b\: :ref:`Vector3`, weight\: :ref:`float`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`cubic_interpolate_in_time`\ (\ b\: :ref:`Vector3`, pre_a\: :ref:`Vector3`, post_b\: :ref:`Vector3`, weight\: :ref:`float`, b_t\: :ref:`float`, pre_a_t\: :ref:`float`, post_b_t\: :ref:`float`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`direction_to`\ (\ to\: :ref:`Vector3`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`distance_squared_to`\ (\ to\: :ref:`Vector3`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`distance_to`\ (\ to\: :ref:`Vector3`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`dot`\ (\ with\: :ref:`Vector3`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`floor`\ (\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`inverse`\ (\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_equal_approx`\ (\ to\: :ref:`Vector3`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_finite`\ (\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_normalized`\ (\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_zero_approx`\ (\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`length`\ (\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`length_squared`\ (\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`lerp`\ (\ to\: :ref:`Vector3`, weight\: :ref:`float`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`limit_length`\ (\ length\: :ref:`float` = 1.0\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`max`\ (\ with\: :ref:`Vector3`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`max_axis_index`\ (\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`maxf`\ (\ with\: :ref:`float`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`min`\ (\ with\: :ref:`Vector3`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`min_axis_index`\ (\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`minf`\ (\ with\: :ref:`float`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`move_toward`\ (\ to\: :ref:`Vector3`, delta\: :ref:`float`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`normalized`\ (\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`octahedron_decode`\ (\ uv\: :ref:`Vector2`\ ) |static| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`octahedron_encode`\ (\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Basis` | :ref:`outer`\ (\ with\: :ref:`Vector3`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`posmod`\ (\ mod\: :ref:`float`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`posmodv`\ (\ modv\: :ref:`Vector3`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`project`\ (\ b\: :ref:`Vector3`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`reflect`\ (\ n\: :ref:`Vector3`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`rotated`\ (\ axis\: :ref:`Vector3`, angle\: :ref:`float`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`round`\ (\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`sign`\ (\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`signed_angle_to`\ (\ to\: :ref:`Vector3`, axis\: :ref:`Vector3`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`slerp`\ (\ to\: :ref:`Vector3`, weight\: :ref:`float`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`slide`\ (\ n\: :ref:`Vector3`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`snapped`\ (\ step\: :ref:`Vector3`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`snappedf`\ (\ step\: :ref:`float`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`abs`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`angle_to`\ (\ to\: :ref:`Vector3`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`bezier_derivative`\ (\ control_1\: :ref:`Vector3`, control_2\: :ref:`Vector3`, end\: :ref:`Vector3`, t\: :ref:`float`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`bezier_interpolate`\ (\ control_1\: :ref:`Vector3`, control_2\: :ref:`Vector3`, end\: :ref:`Vector3`, t\: :ref:`float`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`bounce`\ (\ n\: :ref:`Vector3`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`ceil`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`clamp`\ (\ min\: :ref:`Vector3`, max\: :ref:`Vector3`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`clampf`\ (\ min\: :ref:`float`, max\: :ref:`float`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`cross`\ (\ with\: :ref:`Vector3`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`cubic_interpolate`\ (\ b\: :ref:`Vector3`, pre_a\: :ref:`Vector3`, post_b\: :ref:`Vector3`, weight\: :ref:`float`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`cubic_interpolate_in_time`\ (\ b\: :ref:`Vector3`, pre_a\: :ref:`Vector3`, post_b\: :ref:`Vector3`, weight\: :ref:`float`, b_t\: :ref:`float`, pre_a_t\: :ref:`float`, post_b_t\: :ref:`float`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`direction_to`\ (\ to\: :ref:`Vector3`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`distance_squared_to`\ (\ to\: :ref:`Vector3`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`distance_to`\ (\ to\: :ref:`Vector3`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`dot`\ (\ with\: :ref:`Vector3`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`floor`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`inverse`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_equal_approx`\ (\ to\: :ref:`Vector3`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_finite`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_normalized`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_zero_approx`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`length`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`length_squared`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`lerp`\ (\ to\: :ref:`Vector3`, weight\: :ref:`float`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`limit_length`\ (\ length\: :ref:`float` = 1.0\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`max`\ (\ with\: :ref:`Vector3`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`max_axis_index`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`maxf`\ (\ with\: :ref:`float`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`min`\ (\ with\: :ref:`Vector3`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`min_axis_index`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`minf`\ (\ with\: :ref:`float`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`monotonic_cubic_interpolate`\ (\ b\: :ref:`Vector3`, pre_a\: :ref:`Vector3`, post_b\: :ref:`Vector3`, weight\: :ref:`float`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`monotonic_cubic_interpolate_in_time`\ (\ b\: :ref:`Vector3`, pre_a\: :ref:`Vector3`, post_b\: :ref:`Vector3`, weight\: :ref:`float`, b_t\: :ref:`float`, pre_a_t\: :ref:`float`, post_b_t\: :ref:`float`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`move_toward`\ (\ to\: :ref:`Vector3`, delta\: :ref:`float`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`normalized`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`octahedron_decode`\ (\ uv\: :ref:`Vector2`\ ) |static| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`octahedron_encode`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Basis` | :ref:`outer`\ (\ with\: :ref:`Vector3`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`posmod`\ (\ mod\: :ref:`float`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`posmodv`\ (\ modv\: :ref:`Vector3`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`project`\ (\ b\: :ref:`Vector3`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`reflect`\ (\ n\: :ref:`Vector3`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`rotated`\ (\ axis\: :ref:`Vector3`, angle\: :ref:`float`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`round`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`sign`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`signed_angle_to`\ (\ to\: :ref:`Vector3`, axis\: :ref:`Vector3`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`slerp`\ (\ to\: :ref:`Vector3`, weight\: :ref:`float`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`slide`\ (\ n\: :ref:`Vector3`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`snapped`\ (\ step\: :ref:`Vector3`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`snappedf`\ (\ step\: :ref:`float`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -887,6 +891,32 @@ Returns the component-wise minimum of this and ``with``, equivalent to ``Vector3 ---- +.. _class_Vector3_method_monotonic_cubic_interpolate: + +.. rst-class:: classref-method + +:ref:`Vector3` **monotonic_cubic_interpolate**\ (\ b\: :ref:`Vector3`, pre_a\: :ref:`Vector3`, post_b\: :ref:`Vector3`, weight\: :ref:`float`\ ) |const| :ref:`🔗` + +Performs a monotonic cubic interpolation between this vector and ``b`` using ``pre_a`` and ``post_b`` as handles, and returns the result at position ``weight``. ``weight`` is on the range of 0.0 to 1.0, representing the amount of interpolation. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Vector3_method_monotonic_cubic_interpolate_in_time: + +.. rst-class:: classref-method + +:ref:`Vector3` **monotonic_cubic_interpolate_in_time**\ (\ b\: :ref:`Vector3`, pre_a\: :ref:`Vector3`, post_b\: :ref:`Vector3`, weight\: :ref:`float`, b_t\: :ref:`float`, pre_a_t\: :ref:`float`, post_b_t\: :ref:`float`\ ) |const| :ref:`🔗` + +Performs a monotonic cubic interpolation between this vector and ``b`` using ``pre_a`` and ``post_b`` as handles, and returns the result at position ``weight``. ``weight`` is on the range of 0.0 to 1.0, representing the amount of interpolation. + +It can perform smoother interpolation than :ref:`monotonic_cubic_interpolate()` by the time values. + +.. rst-class:: classref-item-separator + +---- + .. _class_Vector3_method_move_toward: .. rst-class:: classref-method diff --git a/classes/class_vector4.rst b/classes/class_vector4.rst index c0382fc4ac7..97f2a8fb8cb 100644 --- a/classes/class_vector4.rst +++ b/classes/class_vector4.rst @@ -69,71 +69,75 @@ Methods .. table:: :widths: auto - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4` | :ref:`abs`\ (\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4` | :ref:`ceil`\ (\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4` | :ref:`clamp`\ (\ min\: :ref:`Vector4`, max\: :ref:`Vector4`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4` | :ref:`clampf`\ (\ min\: :ref:`float`, max\: :ref:`float`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4` | :ref:`cubic_interpolate`\ (\ b\: :ref:`Vector4`, pre_a\: :ref:`Vector4`, post_b\: :ref:`Vector4`, weight\: :ref:`float`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4` | :ref:`cubic_interpolate_in_time`\ (\ b\: :ref:`Vector4`, pre_a\: :ref:`Vector4`, post_b\: :ref:`Vector4`, weight\: :ref:`float`, b_t\: :ref:`float`, pre_a_t\: :ref:`float`, post_b_t\: :ref:`float`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4` | :ref:`direction_to`\ (\ to\: :ref:`Vector4`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`distance_squared_to`\ (\ to\: :ref:`Vector4`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`distance_to`\ (\ to\: :ref:`Vector4`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`dot`\ (\ with\: :ref:`Vector4`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4` | :ref:`floor`\ (\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4` | :ref:`inverse`\ (\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_equal_approx`\ (\ to\: :ref:`Vector4`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_finite`\ (\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_normalized`\ (\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_zero_approx`\ (\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`length`\ (\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`length_squared`\ (\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4` | :ref:`lerp`\ (\ to\: :ref:`Vector4`, weight\: :ref:`float`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4` | :ref:`max`\ (\ with\: :ref:`Vector4`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`max_axis_index`\ (\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4` | :ref:`maxf`\ (\ with\: :ref:`float`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4` | :ref:`min`\ (\ with\: :ref:`Vector4`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`min_axis_index`\ (\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4` | :ref:`minf`\ (\ with\: :ref:`float`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4` | :ref:`normalized`\ (\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4` | :ref:`posmod`\ (\ mod\: :ref:`float`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4` | :ref:`posmodv`\ (\ modv\: :ref:`Vector4`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4` | :ref:`round`\ (\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4` | :ref:`sign`\ (\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4` | :ref:`snapped`\ (\ step\: :ref:`Vector4`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4` | :ref:`snappedf`\ (\ step\: :ref:`float`\ ) |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4` | :ref:`abs`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4` | :ref:`ceil`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4` | :ref:`clamp`\ (\ min\: :ref:`Vector4`, max\: :ref:`Vector4`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4` | :ref:`clampf`\ (\ min\: :ref:`float`, max\: :ref:`float`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4` | :ref:`cubic_interpolate`\ (\ b\: :ref:`Vector4`, pre_a\: :ref:`Vector4`, post_b\: :ref:`Vector4`, weight\: :ref:`float`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4` | :ref:`cubic_interpolate_in_time`\ (\ b\: :ref:`Vector4`, pre_a\: :ref:`Vector4`, post_b\: :ref:`Vector4`, weight\: :ref:`float`, b_t\: :ref:`float`, pre_a_t\: :ref:`float`, post_b_t\: :ref:`float`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4` | :ref:`direction_to`\ (\ to\: :ref:`Vector4`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`distance_squared_to`\ (\ to\: :ref:`Vector4`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`distance_to`\ (\ to\: :ref:`Vector4`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`dot`\ (\ with\: :ref:`Vector4`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4` | :ref:`floor`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4` | :ref:`inverse`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_equal_approx`\ (\ to\: :ref:`Vector4`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_finite`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_normalized`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_zero_approx`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`length`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`length_squared`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4` | :ref:`lerp`\ (\ to\: :ref:`Vector4`, weight\: :ref:`float`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4` | :ref:`max`\ (\ with\: :ref:`Vector4`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`max_axis_index`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4` | :ref:`maxf`\ (\ with\: :ref:`float`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4` | :ref:`min`\ (\ with\: :ref:`Vector4`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`min_axis_index`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4` | :ref:`minf`\ (\ with\: :ref:`float`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4` | :ref:`monotonic_cubic_interpolate`\ (\ b\: :ref:`Vector4`, pre_a\: :ref:`Vector4`, post_b\: :ref:`Vector4`, weight\: :ref:`float`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4` | :ref:`monotonic_cubic_interpolate_in_time`\ (\ b\: :ref:`Vector4`, pre_a\: :ref:`Vector4`, post_b\: :ref:`Vector4`, weight\: :ref:`float`, b_t\: :ref:`float`, pre_a_t\: :ref:`float`, post_b_t\: :ref:`float`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4` | :ref:`normalized`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4` | :ref:`posmod`\ (\ mod\: :ref:`float`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4` | :ref:`posmodv`\ (\ modv\: :ref:`Vector4`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4` | :ref:`round`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4` | :ref:`sign`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4` | :ref:`snapped`\ (\ step\: :ref:`Vector4`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4` | :ref:`snappedf`\ (\ step\: :ref:`float`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -678,6 +682,32 @@ Returns the component-wise minimum of this and ``with``, equivalent to ``Vector4 ---- +.. _class_Vector4_method_monotonic_cubic_interpolate: + +.. rst-class:: classref-method + +:ref:`Vector4` **monotonic_cubic_interpolate**\ (\ b\: :ref:`Vector4`, pre_a\: :ref:`Vector4`, post_b\: :ref:`Vector4`, weight\: :ref:`float`\ ) |const| :ref:`🔗` + +Performs a monotonic cubic interpolation between this vector and ``b`` using ``pre_a`` and ``post_b`` as handles, and returns the result at position ``weight``. ``weight`` is on the range of 0.0 to 1.0, representing the amount of interpolation. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Vector4_method_monotonic_cubic_interpolate_in_time: + +.. rst-class:: classref-method + +:ref:`Vector4` **monotonic_cubic_interpolate_in_time**\ (\ b\: :ref:`Vector4`, pre_a\: :ref:`Vector4`, post_b\: :ref:`Vector4`, weight\: :ref:`float`, b_t\: :ref:`float`, pre_a_t\: :ref:`float`, post_b_t\: :ref:`float`\ ) |const| :ref:`🔗` + +Performs a monotonic cubic interpolation between this vector and ``b`` using ``pre_a`` and ``post_b`` as handles, and returns the result at position ``weight``. ``weight`` is on the range of 0.0 to 1.0, representing the amount of interpolation. + +It can perform smoother interpolation than :ref:`monotonic_cubic_interpolate()` by the time values. + +.. rst-class:: classref-item-separator + +---- + .. _class_Vector4_method_normalized: .. rst-class:: classref-method diff --git a/classes/class_webxrinterface.rst b/classes/class_webxrinterface.rst index a7a64d00f6e..28eafae0bba 100644 --- a/classes/class_webxrinterface.rst +++ b/classes/class_webxrinterface.rst @@ -425,7 +425,7 @@ A comma-separated list of features that were successfully enabled by :ref:`XRInt This may include features requested by setting :ref:`required_features` and :ref:`optional_features`, and will only be available after :ref:`session_started` has been emitted. -\ **Note:** This may not be support by all web browsers, in which case it will be an empty string. +\ **Note:** This may not be supported by all web browsers, in which case it will be an empty string. .. rst-class:: classref-item-separator @@ -442,7 +442,7 @@ This may include features requested by setting :ref:`required_features`\ ) - :ref:`String` **get_optional_features**\ (\ ) -A comma-seperated list of optional features used by :ref:`XRInterface.initialize()` when setting up the WebXR session. +A comma-separated list of optional features used by :ref:`XRInterface.initialize()` when setting up the WebXR session. If a user's browser or device doesn't support one of the given features, initialization will continue, but you won't be able to use the requested feature. @@ -483,7 +483,7 @@ Possible values come from `WebXR's XRReferenceSpaceType `\ ) - :ref:`String` **get_requested_reference_space_types**\ (\ ) -A comma-seperated list of reference space types used by :ref:`XRInterface.initialize()` when setting up the WebXR session. +A comma-separated list of reference space types used by :ref:`XRInterface.initialize()` when setting up the WebXR session. The reference space types are requested in order, and the first one supported by the user's device or browser will be used. The :ref:`reference_space_type` property contains the reference space type that was ultimately selected. @@ -506,7 +506,7 @@ Possible values come from `WebXR's XRReferenceSpaceType `\ ) - :ref:`String` **get_required_features**\ (\ ) -A comma-seperated list of required features used by :ref:`XRInterface.initialize()` when setting up the WebXR session. +A comma-separated list of required features used by :ref:`XRInterface.initialize()` when setting up the WebXR session. If a user's browser or device doesn't support one of the given features, initialization will fail and :ref:`session_failed` will be emitted. @@ -622,7 +622,7 @@ Use this method to get information about the input source that triggered one of - :ref:`squeeze`\ -- :ref:`squeezestart` +- :ref:`squeezeend` .. rst-class:: classref-item-separator diff --git a/classes/class_worldscape3d.rst b/classes/class_worldscape3d.rst new file mode 100644 index 00000000000..ece5e30aafb --- /dev/null +++ b/classes/class_worldscape3d.rst @@ -0,0 +1,1259 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Redot engine sources. +.. Generator: https://github.com/Redot-Engine/redot-engine/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/Redot-Engine/redot-engine/tree/master/modules/worldscape_3d/doc_classes/WorldScape3D.xml. + +.. _class_WorldScape3D: + +WorldScape3D +============ + +**Inherits:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` + +.. rst-class:: classref-introduction-group + +Description +----------- + +WorldScape3D is a clipmap based terrain system that supports terrains from 64x64m up to 65.5x65.5km with multiple LODs, 32 textures, with imported or locally created terrains. + +This class handles mesh generation, and management of the whole system. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +------------------------------------------------------------------------+-------------------------------------------------------------------------------+----------------+ + | :ref:`WorldScape3DAssets` | :ref:`assets` | | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------+----------------+ + | :ref:`ShadowCastingSetting` | :ref:`cast_shadows` | ``1`` | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------+----------------+ + | :ref:`WorldScape3DCollision` | :ref:`collision` | | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------+----------------+ + | :ref:`int` | :ref:`collision_layer` | ``1`` | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------+----------------+ + | :ref:`int` | :ref:`collision_mask` | ``1`` | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------+----------------+ + | :ref:`CollisionMode` | :ref:`collision_mode` | ``1`` | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------+----------------+ + | :ref:`float` | :ref:`collision_priority` | ``1.0`` | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------+----------------+ + | :ref:`int` | :ref:`collision_radius` | ``64`` | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------+----------------+ + | :ref:`int` | :ref:`collision_shape_size` | ``16`` | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------+----------------+ + | :ref:`float` | :ref:`cull_margin` | ``0.0`` | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------+----------------+ + | :ref:`WorldScape3DData` | :ref:`data` | | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------+----------------+ + | :ref:`String` | :ref:`data_directory` | ``""`` | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------+----------------+ + | :ref:`DebugLevel` | :ref:`debug_level` | ``0`` | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------+----------------+ + | :ref:`bool` | :ref:`free_editor_textures` | ``true`` | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------+----------------+ + | :ref:`GIMode` | :ref:`gi_mode` | ``1`` | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------+----------------+ + | :ref:`WorldScape3DInstancer` | :ref:`instancer` | | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------+----------------+ + | :ref:`float` | :ref:`label_distance` | ``0.0`` | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------+----------------+ + | :ref:`int` | :ref:`label_size` | ``48`` | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------+----------------+ + | :ref:`WorldScape3DMaterial` | :ref:`material` | | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------+----------------+ + | :ref:`int` | :ref:`mesh_lods` | ``7`` | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------+----------------+ + | :ref:`int` | :ref:`mesh_size` | ``48`` | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------+----------------+ + | :ref:`int` | :ref:`mouse_layer` | ``32`` | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------+----------------+ + | :ref:`PhysicsMaterial` | :ref:`physics_material` | | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------+----------------+ + | :ref:`RegionSize` | :ref:`region_size` | ``256`` | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------+----------------+ + | :ref:`int` | :ref:`render_layers` | ``2147483649`` | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------+----------------+ + | :ref:`bool` | :ref:`save_16_bit` | ``false`` | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------+----------------+ + | :ref:`bool` | :ref:`show_autoshader` | ``false`` | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------+----------------+ + | :ref:`bool` | :ref:`show_checkered` | ``false`` | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------+----------------+ + | :ref:`bool` | :ref:`show_colormap` | ``false`` | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------+----------------+ + | :ref:`bool` | :ref:`show_contours` | ``false`` | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------+----------------+ + | :ref:`bool` | :ref:`show_control_angle` | ``false`` | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------+----------------+ + | :ref:`bool` | :ref:`show_control_blend` | ``false`` | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------+----------------+ + | :ref:`bool` | :ref:`show_control_scale` | ``false`` | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------+----------------+ + | :ref:`bool` | :ref:`show_control_texture` | ``false`` | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------+----------------+ + | :ref:`bool` | :ref:`show_grey` | ``false`` | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------+----------------+ + | :ref:`bool` | :ref:`show_grid` | ``false`` | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------+----------------+ + | :ref:`bool` | :ref:`show_heightmap` | ``false`` | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------+----------------+ + | :ref:`bool` | :ref:`show_instancer_grid` | ``false`` | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------+----------------+ + | :ref:`bool` | :ref:`show_instances` | ``true`` | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------+----------------+ + | :ref:`bool` | :ref:`show_jaggedness` | ``false`` | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------+----------------+ + | :ref:`bool` | :ref:`show_navigation` | ``false`` | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------+----------------+ + | :ref:`bool` | :ref:`show_region_grid` | ``false`` | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------+----------------+ + | :ref:`bool` | :ref:`show_roughmap` | ``false`` | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------+----------------+ + | :ref:`bool` | :ref:`show_texture_height` | ``false`` | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------+----------------+ + | :ref:`bool` | :ref:`show_texture_normal` | ``false`` | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------+----------------+ + | :ref:`bool` | :ref:`show_texture_rough` | ``false`` | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------+----------------+ + | :ref:`bool` | :ref:`show_vertex_grid` | ``false`` | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------+----------------+ + | :ref:`float` | :ref:`vertex_spacing` | ``1.0`` | + +------------------------------------------------------------------------+-------------------------------------------------------------------------------+----------------+ + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Mesh` | :ref:`bake_mesh`\ (\ lod\: :ref:`int`, filter\: :ref:`HeightFilter` = 0\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector3Array` | :ref:`generate_nav_mesh_source_geometry`\ (\ global_aabb\: :ref:`AABB`, require_nav\: :ref:`bool` = true\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Camera3D` | :ref:`get_camera`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_intersection`\ (\ src_pos\: :ref:`Vector3`, direction\: :ref:`Vector3`, gpu_mode\: :ref:`bool` = false\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_snapped_position`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_camera`\ (\ camera\: :ref:`Camera3D`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Signals +------- + +.. _class_WorldScape3D_signal_assets_changed: + +.. rst-class:: classref-signal + +**assets_changed**\ (\ ) :ref:`🔗` + +Emitted when :ref:`assets` is changed. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3D_signal_material_changed: + +.. rst-class:: classref-signal + +**material_changed**\ (\ ) :ref:`🔗` + +Emitted when :ref:`material` is changed. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Enumerations +------------ + +.. _enum_WorldScape3D_DebugLevel: + +.. rst-class:: classref-enumeration + +enum **DebugLevel**: :ref:`🔗` + +.. _class_WorldScape3D_constant_ERROR: + +.. rst-class:: classref-enumeration-constant + +:ref:`DebugLevel` **ERROR** = ``0`` + +Errors and warnings always print. + +.. _class_WorldScape3D_constant_INFO: + +.. rst-class:: classref-enumeration-constant + +:ref:`DebugLevel` **INFO** = ``1`` + +Typically every function call and other important informational messages. + +.. _class_WorldScape3D_constant_DEBUG: + +.. rst-class:: classref-enumeration-constant + +:ref:`DebugLevel` **DEBUG** = ``2`` + +Detailed steps within functions. + +.. _class_WorldScape3D_constant_EXTREME: + +.. rst-class:: classref-enumeration-constant + +:ref:`DebugLevel` **EXTREME** = ``3`` + +Messages for continuous operations like snapping and editing. + +.. rst-class:: classref-item-separator + +---- + +.. _enum_WorldScape3D_RegionSize: + +.. rst-class:: classref-enumeration + +enum **RegionSize**: :ref:`🔗` + +.. _class_WorldScape3D_constant_SIZE_64: + +.. rst-class:: classref-enumeration-constant + +:ref:`RegionSize` **SIZE_64** = ``64`` + +The region size is 64 x 64 meters, vertices, and pixels on Image maps. + +.. _class_WorldScape3D_constant_SIZE_128: + +.. rst-class:: classref-enumeration-constant + +:ref:`RegionSize` **SIZE_128** = ``128`` + +The region size is 128 x 128 meters, vertices, and pixels on Image maps. + +.. _class_WorldScape3D_constant_SIZE_256: + +.. rst-class:: classref-enumeration-constant + +:ref:`RegionSize` **SIZE_256** = ``256`` + +The region size is 256 x 256 meters, vertices, and pixels on Image maps. (default) + +.. _class_WorldScape3D_constant_SIZE_512: + +.. rst-class:: classref-enumeration-constant + +:ref:`RegionSize` **SIZE_512** = ``512`` + +The region size is 512 x 512 meters, vertices, and pixels on Image maps. + +.. _class_WorldScape3D_constant_SIZE_1024: + +.. rst-class:: classref-enumeration-constant + +:ref:`RegionSize` **SIZE_1024** = ``1024`` + +The region size is 1024 x 1024 meters, vertices, and pixels on Image maps. + +.. _class_WorldScape3D_constant_SIZE_2048: + +.. rst-class:: classref-enumeration-constant + +:ref:`RegionSize` **SIZE_2048** = ``2048`` + +The region size is 2048 x 2048 meters, vertices, and pixels on Image maps. + +.. _class_WorldScape3D_constant_SIZE_4096: + +.. rst-class:: classref-enumeration-constant + +:ref:`RegionSize` **SIZE_4096** = ``4096`` + +The region size is 4096 x 4096 meters, vertices, and pixels on Image maps. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_WorldScape3D_property_assets: + +.. rst-class:: classref-property + +:ref:`WorldScape3DAssets` **assets** :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_assets**\ (\ value\: :ref:`WorldScape3DAssets`\ ) +- :ref:`WorldScape3DAssets` **get_assets**\ (\ ) + +The list of texture and mesh assets used by WorldScape3D. You can optionally save this as an external ``.tres`` text file if you wish to share it with WorldScape3D nodes in other scenes. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3D_property_cast_shadows: + +.. rst-class:: classref-property + +:ref:`ShadowCastingSetting` **cast_shadows** = ``1`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_cast_shadows**\ (\ value\: :ref:`ShadowCastingSetting`\ ) +- :ref:`ShadowCastingSetting` **get_cast_shadows**\ (\ ) + +Tells the renderer how to cast shadows from the terrain onto other objects. This sets ``GeometryInstance3D.ShadowCastingSetting`` in the engine. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3D_property_collision: + +.. rst-class:: classref-property + +:ref:`WorldScape3DCollision` **collision** :ref:`🔗` + +.. rst-class:: classref-property-setget + +- :ref:`WorldScape3DCollision` **get_collision**\ (\ ) + +The active :ref:`WorldScape3DCollision` object. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3D_property_collision_layer: + +.. rst-class:: classref-property + +:ref:`int` **collision_layer** = ``1`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_collision_layer**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_collision_layer**\ (\ ) + +Alias for :ref:`WorldScape3DCollision.layer`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3D_property_collision_mask: + +.. rst-class:: classref-property + +:ref:`int` **collision_mask** = ``1`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_collision_mask**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_collision_mask**\ (\ ) + +Alias for :ref:`WorldScape3DCollision.mask`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3D_property_collision_mode: + +.. rst-class:: classref-property + +:ref:`CollisionMode` **collision_mode** = ``1`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_collision_mode**\ (\ value\: :ref:`CollisionMode`\ ) +- :ref:`CollisionMode` **get_collision_mode**\ (\ ) + +Alias for :ref:`WorldScape3DCollision.mode`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3D_property_collision_priority: + +.. rst-class:: classref-property + +:ref:`float` **collision_priority** = ``1.0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_collision_priority**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_collision_priority**\ (\ ) + +Alias for :ref:`WorldScape3DCollision.priority`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3D_property_collision_radius: + +.. rst-class:: classref-property + +:ref:`int` **collision_radius** = ``64`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_collision_radius**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_collision_radius**\ (\ ) + +Alias for :ref:`WorldScape3DCollision.radius`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3D_property_collision_shape_size: + +.. rst-class:: classref-property + +:ref:`int` **collision_shape_size** = ``16`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_collision_shape_size**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_collision_shape_size**\ (\ ) + +Alias for :ref:`WorldScape3DCollision.shape_size`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3D_property_cull_margin: + +.. rst-class:: classref-property + +:ref:`float` **cull_margin** = ``0.0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_cull_margin**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_cull_margin**\ (\ ) + +This margin is added to the vertical component of the terrain bounding box (AABB). The terrain already sets its AABB from :ref:`WorldScape3DData.get_height_range()`, which is calculated while sculpting. This setting only needs to be used if the shader has expanded the terrain beyond the AABB and the terrain meshes are being culled at certain viewing angles. This might happen from using :ref:`WorldScape3DMaterial.world_background` with NOISE and a height value larger than the terrain heights. This setting is similar to ``GeometryInstance3D.extra_cull_margin``, but it only affects the Y axis. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3D_property_data: + +.. rst-class:: classref-property + +:ref:`WorldScape3DData` **data** :ref:`🔗` + +.. rst-class:: classref-property-setget + +- :ref:`WorldScape3DData` **get_data**\ (\ ) + +This class manages loading, saving, adding, and removing of WorldScape3DRegions and access to their content. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3D_property_data_directory: + +.. rst-class:: classref-property + +:ref:`String` **data_directory** = ``""`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_data_directory**\ (\ value\: :ref:`String`\ ) +- :ref:`String` **get_data_directory**\ (\ ) + +The directory where terrain data will be saved to and loaded from. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3D_property_debug_level: + +.. rst-class:: classref-property + +:ref:`DebugLevel` **debug_level** = ``0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_debug_level**\ (\ value\: :ref:`DebugLevel`\ ) +- :ref:`DebugLevel` **get_debug_level**\ (\ ) + +The verbosity of debug messages printed to the console. Errors and warnings are always printed. This can also be set via command line using ``--terrain-debug=LEVEL`` where ``LEVEL`` is one of ``ERROR, INFO, DEBUG, EXTREME``. The last includes continuously recurring messages like position updates for the mesh as the camera moves around. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3D_property_free_editor_textures: + +.. rst-class:: classref-property + +:ref:`bool` **free_editor_textures** = ``true`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_free_editor_textures**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_free_editor_textures**\ (\ ) + +Frees ground textures used for editing in _ready(). These textures are used to generate the TextureArrays, so if you don't change any :ref:`WorldScape3DTextureAsset` settings in game, this can be enabled. Also reloads the texture asset list in _enter_tree() in case you load scenes via code and need the textures again. Calls :ref:`WorldScape3DAssets.clear_textures()`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3D_property_gi_mode: + +.. rst-class:: classref-property + +:ref:`GIMode` **gi_mode** = ``1`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_gi_mode**\ (\ value\: :ref:`GIMode`\ ) +- :ref:`GIMode` **get_gi_mode**\ (\ ) + +Tells the renderer which global illumination mode to use for WorldScape3D. This sets ``GeometryInstance3D.gi_mode`` in the engine. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3D_property_instancer: + +.. rst-class:: classref-property + +:ref:`WorldScape3DInstancer` **instancer** :ref:`🔗` + +.. rst-class:: classref-property-setget + +- :ref:`WorldScape3DInstancer` **get_instancer**\ (\ ) + +The active :ref:`WorldScape3DInstancer` object. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3D_property_label_distance: + +.. rst-class:: classref-property + +:ref:`float` **label_distance** = ``0.0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_label_distance**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_label_distance**\ (\ ) + +If label_distance is non-zero (try 1024-4096) it will generate and display region coordinates in the viewport so you can identify the exact region files you are editing. This setting is the visible distance of the labels. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3D_property_label_size: + +.. rst-class:: classref-property + +:ref:`int` **label_size** = ``48`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_label_size**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_label_size**\ (\ ) + +Sets the font size for region labels. See :ref:`label_distance`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3D_property_material: + +.. rst-class:: classref-property + +:ref:`WorldScape3DMaterial` **material** :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_material**\ (\ value\: :ref:`WorldScape3DMaterial`\ ) +- :ref:`WorldScape3DMaterial` **get_material**\ (\ ) + +A custom material for WorldScape3D. You can optionally save this as an external ``.tres`` text file if you wish to share it with instances of WorldScape3D in other scenes. See :ref:`WorldScape3DMaterial`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3D_property_mesh_lods: + +.. rst-class:: classref-property + +:ref:`int` **mesh_lods** = ``7`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_mesh_lods**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_mesh_lods**\ (\ ) + +The number of lods generated in the mesh. Enable wireframe mode in the viewport to see them. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3D_property_mesh_size: + +.. rst-class:: classref-property + +:ref:`int` **mesh_size** = ``48`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_mesh_size**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_mesh_size**\ (\ ) + +The correlated size of the terrain meshes. Lod0 has ``4*mesh_size + 2`` quads per side. E.g. when mesh_size=8, lod0 has 34 quads to a side, including 2 quads for seams. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3D_property_mouse_layer: + +.. rst-class:: classref-property + +:ref:`int` **mouse_layer** = ``32`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_mouse_layer**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_mouse_layer**\ (\ ) + +Redot supports 32 render layers. For most objects, only layers 1-20 are available for selection in the inspector. 21-32 are settable via code, and are considered reserved for editor plugins. + +This variable sets the editor render layer (21-32) to be used by ``get_intersection``, which the mouse cursor uses. + +You may place other objects on this layer, however ``get_intersection`` will report intersections with them. So either dedicate this layer to WorldScape3D, or if you must use all 32 layers, dedicate this one during editing or when using ``get_intersection``, and then you can use it during game play. + +See :ref:`get_intersection()`.` + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3D_property_physics_material: + +.. rst-class:: classref-property + +:ref:`PhysicsMaterial` **physics_material** :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_physics_material**\ (\ value\: :ref:`PhysicsMaterial`\ ) +- :ref:`PhysicsMaterial` **get_physics_material**\ (\ ) + +Alias for :ref:`WorldScape3DCollision.physics_material`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3D_property_region_size: + +.. rst-class:: classref-property + +:ref:`RegionSize` **region_size** = ``256`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **change_region_size**\ (\ value\: :ref:`RegionSize`\ ) +- :ref:`RegionSize` **get_region_size**\ (\ ) + +The number of vertices in each region, and the number of pixels for each map in :ref:`WorldScape3DRegion`. 1 pixel always corresponds to 1 vertex. :ref:`vertex_spacing` laterally scales regions, but does not change the number of vertices or pixels in each. + +There is no undo for this operation. However you can apply it again to reslice, as long as your data doesn't hit the maximum boundaries. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3D_property_render_layers: + +.. rst-class:: classref-property + +:ref:`int` **render_layers** = ``2147483649`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_render_layers**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_render_layers**\ (\ ) + +The render layers the terrain is drawn on. This sets ``VisualInstance3D.layers`` in the engine. The defaults is layer 1 and 32 (for the mouse cursor). When you set this, make sure the layer for :ref:`mouse_layer` is included, or set that variable again after this so that the mouse cursor works. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3D_property_save_16_bit: + +.. rst-class:: classref-property + +:ref:`bool` **save_16_bit** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_save_16_bit**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_save_16_bit**\ (\ ) + +If enabled, heightmaps are saved as 16-bit half-precision to reduce file size. Files are always loaded in 32-bit for editing. Upon save, a copy of the heightmap is converted to 16-bit for writing. It does not change what is currently in memory. + +This process is lossy. 16-bit precision gets increasingly worse with every power of 2. At a height of 256m, the precision interval is .25m. At 512m it is .5m. At 1024m it is 1m. Saving a height of 1024.4m will be rounded down to 1024m. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3D_property_show_autoshader: + +.. rst-class:: classref-property + +:ref:`bool` **show_autoshader** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_show_autoshader**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_show_autoshader**\ (\ ) + +Alias for :ref:`WorldScape3DMaterial.show_autoshader`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3D_property_show_checkered: + +.. rst-class:: classref-property + +:ref:`bool` **show_checkered** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_show_checkered**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_show_checkered**\ (\ ) + +Alias for :ref:`WorldScape3DMaterial.show_checkered`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3D_property_show_colormap: + +.. rst-class:: classref-property + +:ref:`bool` **show_colormap** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_show_colormap**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_show_colormap**\ (\ ) + +Alias for :ref:`WorldScape3DMaterial.show_colormap`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3D_property_show_contours: + +.. rst-class:: classref-property + +:ref:`bool` **show_contours** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_show_contours**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_show_contours**\ (\ ) + +Alias for :ref:`WorldScape3DMaterial.show_contours`. Press `4` with the mouse in the viewport to toggle. Customize in the material. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3D_property_show_control_angle: + +.. rst-class:: classref-property + +:ref:`bool` **show_control_angle** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_show_control_angle**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_show_control_angle**\ (\ ) + +Alias for :ref:`WorldScape3DMaterial.show_control_angle`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3D_property_show_control_blend: + +.. rst-class:: classref-property + +:ref:`bool` **show_control_blend** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_show_control_blend**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_show_control_blend**\ (\ ) + +Alias for :ref:`WorldScape3DMaterial.show_control_blend`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3D_property_show_control_scale: + +.. rst-class:: classref-property + +:ref:`bool` **show_control_scale** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_show_control_scale**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_show_control_scale**\ (\ ) + +Alias for :ref:`WorldScape3DMaterial.show_control_scale`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3D_property_show_control_texture: + +.. rst-class:: classref-property + +:ref:`bool` **show_control_texture** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_show_control_texture**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_show_control_texture**\ (\ ) + +Alias for :ref:`WorldScape3DMaterial.show_control_texture`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3D_property_show_grey: + +.. rst-class:: classref-property + +:ref:`bool` **show_grey** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_show_grey**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_show_grey**\ (\ ) + +Alias for :ref:`WorldScape3DMaterial.show_grey`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3D_property_show_grid: + +.. rst-class:: classref-property + +:ref:`bool` **show_grid** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_show_region_grid**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_show_region_grid**\ (\ ) + +Alias for :ref:`WorldScape3DMaterial.show_region_grid`. Press `1` with the mouse in the viewport to toggle. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3D_property_show_heightmap: + +.. rst-class:: classref-property + +:ref:`bool` **show_heightmap** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_show_heightmap**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_show_heightmap**\ (\ ) + +Alias for :ref:`WorldScape3DMaterial.show_heightmap`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3D_property_show_instancer_grid: + +.. rst-class:: classref-property + +:ref:`bool` **show_instancer_grid** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_show_instancer_grid**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_show_instancer_grid**\ (\ ) + +Alias for :ref:`WorldScape3DMaterial.show_instancer_grid`. Press `2` with the mouse in the viewport to toggle. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3D_property_show_instances: + +.. rst-class:: classref-property + +:ref:`bool` **show_instances** = ``true`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_show_instances**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_show_instances**\ (\ ) + +Shows or hides all instancer meshes. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3D_property_show_jaggedness: + +.. rst-class:: classref-property + +:ref:`bool` **show_jaggedness** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_show_jaggedness**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_show_jaggedness**\ (\ ) + +Alias for :ref:`WorldScape3DMaterial.show_jaggedness`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3D_property_show_navigation: + +.. rst-class:: classref-property + +:ref:`bool` **show_navigation** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_show_navigation**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_show_navigation**\ (\ ) + +Alias for :ref:`WorldScape3DMaterial.show_navigation`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3D_property_show_region_grid: + +.. rst-class:: classref-property + +:ref:`bool` **show_region_grid** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_show_region_grid**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_show_region_grid**\ (\ ) + +Alias for :ref:`WorldScape3DMaterial.show_region_grid`. Press `1` with the mouse in the viewport to toggle. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3D_property_show_roughmap: + +.. rst-class:: classref-property + +:ref:`bool` **show_roughmap** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_show_roughmap**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_show_roughmap**\ (\ ) + +Alias for :ref:`WorldScape3DMaterial.show_roughmap`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3D_property_show_texture_height: + +.. rst-class:: classref-property + +:ref:`bool` **show_texture_height** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_show_texture_height**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_show_texture_height**\ (\ ) + +Alias for :ref:`WorldScape3DMaterial.show_texture_height`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3D_property_show_texture_normal: + +.. rst-class:: classref-property + +:ref:`bool` **show_texture_normal** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_show_texture_normal**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_show_texture_normal**\ (\ ) + +Alias for :ref:`WorldScape3DMaterial.show_texture_normal`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3D_property_show_texture_rough: + +.. rst-class:: classref-property + +:ref:`bool` **show_texture_rough** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_show_texture_rough**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_show_texture_rough**\ (\ ) + +Alias for :ref:`WorldScape3DMaterial.show_texture_rough`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3D_property_show_vertex_grid: + +.. rst-class:: classref-property + +:ref:`bool` **show_vertex_grid** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_show_vertex_grid**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_show_vertex_grid**\ (\ ) + +Alias for :ref:`WorldScape3DMaterial.show_vertex_grid`. Press `3` with the mouse in the viewport to toggle. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3D_property_vertex_spacing: + +.. rst-class:: classref-property + +:ref:`float` **vertex_spacing** = ``1.0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_vertex_spacing**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_vertex_spacing**\ (\ ) + +The distance between vertices. Redot units are typically considered to be meters. This laterally scales the terrain on X and Z axes. + +This variable changes the global position of landscape features. A mountain peak might be at (512, 512), but with a vertex spacing of 2.0 it is now located at (1024, 1024). + +All WorldScape3D functions with a global_position expect an absolute global value. If you would normally use :ref:`WorldScape3DData.import_images()` to import an image in the region at (-1024, -1024), with a vertex_spacing of 2, you'll need to import that image at (-2048, -2048) to place it in the same region. + +To scale heights, export the height map and reimport it with a new height scale. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_WorldScape3D_method_bake_mesh: + +.. rst-class:: classref-method + +:ref:`Mesh` **bake_mesh**\ (\ lod\: :ref:`int`, filter\: :ref:`HeightFilter` = 0\ ) |const| :ref:`🔗` + +Generates a static ArrayMesh for the terrain. + +\ ``lod`` - Determines the granularity of the generated mesh. The range is 0-8. 4 is recommended. + +\ ``filter`` - Controls how vertex Y coordinates are generated from the height map. See :ref:`HeightFilter`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3D_method_generate_nav_mesh_source_geometry: + +.. rst-class:: classref-method + +:ref:`PackedVector3Array` **generate_nav_mesh_source_geometry**\ (\ global_aabb\: :ref:`AABB`, require_nav\: :ref:`bool` = true\ ) |const| :ref:`🔗` + +Generates source geometry faces for input to nav mesh baking. Geometry is only generated where there are no holes and the terrain has been painted as navigable. + +\ ``global_aabb`` - If non-empty, geometry will be generated only within this AABB. If empty, geometry will be generated for the entire terrain. + +\ ``require_nav`` - If true, this function will only generate geometry for terrain marked navigable. Otherwise, geometry is generated for the entire terrain within the AABB (which can be useful for dynamic and/or runtime nav mesh baking). + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3D_method_get_camera: + +.. rst-class:: classref-method + +:ref:`Camera3D` **get_camera**\ (\ ) |const| :ref:`🔗` + +Returns the camera the terrain is currently snapping to. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3D_method_get_intersection: + +.. rst-class:: classref-method + +:ref:`Vector3` **get_intersection**\ (\ src_pos\: :ref:`Vector3`, direction\: :ref:`Vector3`, gpu_mode\: :ref:`bool` = false\ ) :ref:`🔗` + +Casts a ray from ``src_pos`` pointing towards ``direction``, attempting to intersect the terrain. This operation is does not use physics, so enabling collision is unnecessary. + + + +This function can operate in one of two modes defined by ``gpu_mode``: + +- If gpu_mode is disabled (default), it raymarches from the camera until the terrain is intersected, up to 4000m away. This works with one function call, but only where regions exist. It is slower than gpu_mode and gets increasingly slower the farther away the terrain is, though you may not notice. + + + +- If gpu_mode is enabled, it uses the GPU to detect the mouse. This works wherever the terrain is visible, even outside of regions, but may need to be called twice. + + + +GPU mode places a camera at the specified point and "looks" at the terrain. It uses the depth texture to determine how far away the intersection point is. It requires the use of an editor render layer (default 32) while using this function. See :ref:`mouse_layer`. + + + +The main caveats of using this mode is that the call to get_intersection() requests a viewport be drawn, but cannot wait for it to finish as Redot currently does not support co-routines nor forcing redraw in C++. So the return value is one frame behind, and invalid on the first call. This also means the function cannot be used more than once per frame. This mode works well when used continuously, once per frame, where one frame of difference won't matter. The editor uses this mode to place the mouse cursor decal. + + + +This mode can also be used by your plugins and games, such as a space ship firing lasers at the terrain and causing an explosion at the hit point. However if the calls aren't continuous, eg driven by the mouse, you'll need to call once to capture the viewport image, wait for it to be drawn, then call again to get the result: + +:: + + var target_point = terrain.get_intersection(camera_pos, camera_dir, true) + await RenderingServer.frame_post_draw + target_point = terrain.get_intersection(camera_pos, camera_dir, true) + + + +Possible return values: + +- If the terrain is hit, the intersection point is returned. + +- If there is no intersection, eg. the ray points towards the sky, it returns the maximum double float value ``Vector3(3.402823466e+38F,...)``. You can check this case with this code: ``if point.z > 3.4e38:``\ + +- On error, it returns ``Vector3(NAN, NAN, NAN)`` and prints a message to the console. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3D_method_get_snapped_position: + +.. rst-class:: classref-method + +:ref:`Vector3` **get_snapped_position**\ (\ ) |const| :ref:`🔗` + +Returns the last position the terrain was centered on. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3D_method_set_camera: + +.. rst-class:: classref-method + +|void| **set_camera**\ (\ camera\: :ref:`Camera3D`\ ) :ref:`🔗` + +Sets the camera the terrain snaps to. + +.. |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.)` diff --git a/classes/class_worldscape3dassetresource.rst b/classes/class_worldscape3dassetresource.rst new file mode 100644 index 00000000000..b549b980578 --- /dev/null +++ b/classes/class_worldscape3dassetresource.rst @@ -0,0 +1,32 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Redot engine sources. +.. Generator: https://github.com/Redot-Engine/redot-engine/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/Redot-Engine/redot-engine/tree/master/doc/classes/WorldScape3DAssetResource.xml. + +.. _class_WorldScape3DAssetResource: + +WorldScape3DAssetResource +========================= + +**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` + +**Inherited By:** :ref:`WorldScape3DMeshAsset`, :ref:`WorldScape3DTextureAsset` + +.. rst-class:: classref-introduction-group + +Description +----------- + +Base class of WorldScape3DTextureAsset and WorldScape3DMeshAsset. + +.. |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.)` diff --git a/classes/class_worldscape3dassets.rst b/classes/class_worldscape3dassets.rst new file mode 100644 index 00000000000..1aba403c70a --- /dev/null +++ b/classes/class_worldscape3dassets.rst @@ -0,0 +1,455 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Redot engine sources. +.. Generator: https://github.com/Redot-Engine/redot-engine/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/Redot-Engine/redot-engine/tree/master/modules/worldscape_3d/doc_classes/WorldScape3DAssets.xml. + +.. _class_WorldScape3DAssets: + +WorldScape3DAssets +================== + +**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` + +.. rst-class:: classref-introduction-group + +Description +----------- + +This class contains arrays of :ref:`WorldScape3DTextureAsset` and :ref:`WorldScape3DMeshAsset` resources. It is a savable resource, so you can save it to disk and use the same asset list in multiple scenes that use WorldScape3D. The amount of data is small, so it can be saved as a git-friendly, text based .tres file or left within the scene file. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +----------------------------------------------------------------------------------------------+---------------------------------------------------------------------+--------+ + | :ref:`Array`\[:ref:`WorldScape3DMeshAsset`\] | :ref:`mesh_list` | ``[]`` | + +----------------------------------------------------------------------------------------------+---------------------------------------------------------------------+--------+ + | :ref:`Array`\[:ref:`WorldScape3DTextureAsset`\] | :ref:`texture_list` | ``[]`` | + +----------------------------------------------------------------------------------------------+---------------------------------------------------------------------+--------+ + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_textures`\ (\ update\: :ref:`bool` = false\ ) | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`create_mesh_thumbnails`\ (\ id\: :ref:`int` = -1, size\: :ref:`Vector2i` = Vector2i(128, 128)\ ) | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_albedo_array_rid`\ (\ ) |const| | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`WorldScape3DMeshAsset` | :ref:`get_mesh_asset`\ (\ id\: :ref:`int`\ ) |const| | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_mesh_count`\ (\ ) |const| | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_normal_array_rid`\ (\ ) |const| | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`WorldScape3DTextureAsset` | :ref:`get_texture`\ (\ id\: :ref:`int`\ ) |const| | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedFloat32Array` | :ref:`get_texture_ao_strengths`\ (\ ) |const| | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedColorArray` | :ref:`get_texture_colors`\ (\ ) |const| | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_texture_count`\ (\ ) |const| | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array` | :ref:`get_texture_detiles`\ (\ ) |const| | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedFloat32Array` | :ref:`get_texture_normal_depths`\ (\ ) |const| | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedFloat32Array` | :ref:`get_texture_roughness_mods`\ (\ ) |const| | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedFloat32Array` | :ref:`get_texture_uv_scales`\ (\ ) |const| | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`save`\ (\ path\: :ref:`String` = ""\ ) | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_mesh_asset`\ (\ id\: :ref:`int`, mesh\: :ref:`WorldScape3DMeshAsset`\ ) | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_texture`\ (\ id\: :ref:`int`, texture\: :ref:`WorldScape3DTextureAsset`\ ) | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`update_mesh_list`\ (\ ) | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`update_texture_list`\ (\ ) | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Signals +------- + +.. _class_WorldScape3DAssets_signal_meshes_changed: + +.. rst-class:: classref-signal + +**meshes_changed**\ (\ ) :ref:`🔗` + +Emitted when the mesh list is updated, which happens as a result of a :ref:`WorldScape3DMeshAsset` changing. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DAssets_signal_textures_changed: + +.. rst-class:: classref-signal + +**textures_changed**\ (\ ) :ref:`🔗` + +Emitted when this list is updated due to changes in the texture slots, or the files or settings of any :ref:`WorldScape3DTextureAsset`. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Enumerations +------------ + +.. _enum_WorldScape3DAssets_AssetType: + +.. rst-class:: classref-enumeration + +enum **AssetType**: :ref:`🔗` + +.. _class_WorldScape3DAssets_constant_TYPE_TEXTURE: + +.. rst-class:: classref-enumeration-constant + +:ref:`AssetType` **TYPE_TEXTURE** = ``0`` + +Asset is type WorldScape3DTextureAsset. + +.. _class_WorldScape3DAssets_constant_TYPE_MESH: + +.. rst-class:: classref-enumeration-constant + +:ref:`AssetType` **TYPE_MESH** = ``1`` + +Asset is type WorldScape3DMeshAsset. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Constants +--------- + +.. _class_WorldScape3DAssets_constant_MAX_TEXTURES: + +.. rst-class:: classref-constant + +**MAX_TEXTURES** = ``32`` :ref:`🔗` + +Hard coded maximum number of textures, with IDs in the range of 0-31. Cannot easily be expanded. + +.. _class_WorldScape3DAssets_constant_MAX_MESHES: + +.. rst-class:: classref-constant + +**MAX_MESHES** = ``256`` :ref:`🔗` + +Limit of the maximum number of meshes. Arbitrary, easily expanded. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_WorldScape3DAssets_property_mesh_list: + +.. rst-class:: classref-property + +:ref:`Array`\[:ref:`WorldScape3DMeshAsset`\] **mesh_list** = ``[]`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_mesh_list**\ (\ value\: :ref:`Array`\[:ref:`WorldScape3DMeshAsset`\]\ ) +- :ref:`Array`\[:ref:`WorldScape3DMeshAsset`\] **get_mesh_list**\ (\ ) + +The list of mesh assets. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DAssets_property_texture_list: + +.. rst-class:: classref-property + +:ref:`Array`\[:ref:`WorldScape3DTextureAsset`\] **texture_list** = ``[]`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_texture_list**\ (\ value\: :ref:`Array`\[:ref:`WorldScape3DTextureAsset`\]\ ) +- :ref:`Array`\[:ref:`WorldScape3DTextureAsset`\] **get_texture_list**\ (\ ) + +The list of texture assets. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_WorldScape3DAssets_method_clear_textures: + +.. rst-class:: classref-method + +|void| **clear_textures**\ (\ update\: :ref:`bool` = false\ ) :ref:`🔗` + +After textures are loaded, they are combined into a TextureArray. The originals remain in VRAM and are only used if the :ref:`WorldScape3DTextureAsset` settings are changed and regenerating the TextureArrays are necessary. Use this function to clear the originals if not needed. It removes all textures from the asset list, freeing them if they are not referenced by other objects. + +Update will regenerate the texture arrays housing the textures drawn on the terrain. This will remove all textures and turn the terrain checkerboard. + +A similar ``clear_meshes`` is less useful so hasn't been included. However you can do the same thing with ``get_mesh_list().clear()``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DAssets_method_create_mesh_thumbnails: + +.. rst-class:: classref-method + +|void| **create_mesh_thumbnails**\ (\ id\: :ref:`int` = -1, size\: :ref:`Vector2i` = Vector2i(128, 128)\ ) :ref:`🔗` + +Generates mesh asset preview thumbnails for the asset dock, stored within each mesh asset. Specify id -1 to generate all. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DAssets_method_get_albedo_array_rid: + +.. rst-class:: classref-method + +:ref:`RID` **get_albedo_array_rid**\ (\ ) |const| :ref:`🔗` + +Returns the resource ID of the TextureArray generated from combining all albedo and height textures. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DAssets_method_get_mesh_asset: + +.. rst-class:: classref-method + +:ref:`WorldScape3DMeshAsset` **get_mesh_asset**\ (\ id\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the specified WorldScape3DMeshAsset resource. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DAssets_method_get_mesh_count: + +.. rst-class:: classref-method + +:ref:`int` **get_mesh_count**\ (\ ) |const| :ref:`🔗` + +Returns the number of mesh assets in the list. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DAssets_method_get_normal_array_rid: + +.. rst-class:: classref-method + +:ref:`RID` **get_normal_array_rid**\ (\ ) |const| :ref:`🔗` + +Returns the resource ID of the TextureArray generated from combining all normal and roughness textures. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DAssets_method_get_texture: + +.. rst-class:: classref-method + +:ref:`WorldScape3DTextureAsset` **get_texture**\ (\ id\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the WorldScape3DTextureAsset with the requested ID. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DAssets_method_get_texture_ao_strengths: + +.. rst-class:: classref-method + +:ref:`PackedFloat32Array` **get_texture_ao_strengths**\ (\ ) |const| :ref:`🔗` + +Returns the array of AO strengths for each texture asset, indexed by asset id. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DAssets_method_get_texture_colors: + +.. rst-class:: classref-method + +:ref:`PackedColorArray` **get_texture_colors**\ (\ ) |const| :ref:`🔗` + +Returns the array of albedo tints for each texture asset, indexed by asset id. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DAssets_method_get_texture_count: + +.. rst-class:: classref-method + +:ref:`int` **get_texture_count**\ (\ ) |const| :ref:`🔗` + +Returns the number of texture slots used. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DAssets_method_get_texture_detiles: + +.. rst-class:: classref-method + +:ref:`PackedVector2Array` **get_texture_detiles**\ (\ ) |const| :ref:`🔗` + +Returns the array of detiling values for each texture asset, indexed by asset id. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DAssets_method_get_texture_normal_depths: + +.. rst-class:: classref-method + +:ref:`PackedFloat32Array` **get_texture_normal_depths**\ (\ ) |const| :ref:`🔗` + +Returns the array of normal strengths for each texture asset, indexed by asset id. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DAssets_method_get_texture_roughness_mods: + +.. rst-class:: classref-method + +:ref:`PackedFloat32Array` **get_texture_roughness_mods**\ (\ ) |const| :ref:`🔗` + +Returns the array of roughness modification values for each texture asset, indexed by asset id. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DAssets_method_get_texture_uv_scales: + +.. rst-class:: classref-method + +:ref:`PackedFloat32Array` **get_texture_uv_scales**\ (\ ) |const| :ref:`🔗` + +Returns the array of uv scale values for each texture asset, indexed by asset id. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DAssets_method_save: + +.. rst-class:: classref-method + +:ref:`Error` **save**\ (\ path\: :ref:`String` = ""\ ) :ref:`🔗` + +Saves this texture list resource to disk, if saved as an external ``.tres`` or ``.res`` resource file. + +path - specifies a directory and file name to use from now on. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DAssets_method_set_mesh_asset: + +.. rst-class:: classref-method + +|void| **set_mesh_asset**\ (\ id\: :ref:`int`, mesh\: :ref:`WorldScape3DMeshAsset`\ ) :ref:`🔗` + +Assigns the WorldScape3DMeshAsset to the specified ID slot. It can be null to clear the slot. See :ref:`set_texture()`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DAssets_method_set_texture: + +.. rst-class:: classref-method + +|void| **set_texture**\ (\ id\: :ref:`int`, texture\: :ref:`WorldScape3DTextureAsset`\ ) :ref:`🔗` + +Adds a WorldScape3DTextureAsset at the specified ID slot. The texture can be null to clear the slot, or remove it if its the last in the list. If the specified slot is full, it will be swapped with the source texture ID, or will find the next available ID. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DAssets_method_update_mesh_list: + +.. rst-class:: classref-method + +|void| **update_mesh_list**\ (\ ) :ref:`🔗` + +Updates the internal list of meshes used by the instancer. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DAssets_method_update_texture_list: + +.. rst-class:: classref-method + +|void| **update_texture_list**\ (\ ) :ref:`🔗` + +Regenerates the texture arrays from the list of texture assets, which is sent to the shader. + +.. |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.)` diff --git a/classes/class_worldscape3dcollision.rst b/classes/class_worldscape3dcollision.rst new file mode 100644 index 00000000000..f3f74b6077a --- /dev/null +++ b/classes/class_worldscape3dcollision.rst @@ -0,0 +1,350 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Redot engine sources. +.. Generator: https://github.com/Redot-Engine/redot-engine/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/Redot-Engine/redot-engine/tree/master/modules/worldscape_3d/doc_classes/WorldScape3DCollision.xml. + +.. _class_WorldScape3DCollision: + +WorldScape3DCollision +===================== + +**Inherits:** :ref:`Object` + +.. rst-class:: classref-introduction-group + +Description +----------- + +This class manages collision. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +----------------------------------------------------------------+--------------------------------------------------------------------------------+---------+ + | :ref:`int` | :ref:`layer` | ``1`` | + +----------------------------------------------------------------+--------------------------------------------------------------------------------+---------+ + | :ref:`int` | :ref:`mask` | ``1`` | + +----------------------------------------------------------------+--------------------------------------------------------------------------------+---------+ + | :ref:`CollisionMode` | :ref:`mode` | ``1`` | + +----------------------------------------------------------------+--------------------------------------------------------------------------------+---------+ + | :ref:`PhysicsMaterial` | :ref:`physics_material` | | + +----------------------------------------------------------------+--------------------------------------------------------------------------------+---------+ + | :ref:`float` | :ref:`priority` | ``1.0`` | + +----------------------------------------------------------------+--------------------------------------------------------------------------------+---------+ + | :ref:`int` | :ref:`radius` | ``64`` | + +----------------------------------------------------------------+--------------------------------------------------------------------------------+---------+ + | :ref:`int` | :ref:`shape_size` | ``16`` | + +----------------------------------------------------------------+--------------------------------------------------------------------------------+---------+ + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +-------------------------+-----------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`build`\ (\ ) | + +-------------------------+-----------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`destroy`\ (\ ) | + +-------------------------+-----------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_rid`\ (\ ) |const| | + +-------------------------+-----------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_dynamic_mode`\ (\ ) |const| | + +-------------------------+-----------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_editor_mode`\ (\ ) |const| | + +-------------------------+-----------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_enabled`\ (\ ) |const| | + +-------------------------+-----------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`update`\ (\ rebuild\: :ref:`bool` = false\ ) | + +-------------------------+-----------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Enumerations +------------ + +.. _enum_WorldScape3DCollision_CollisionMode: + +.. rst-class:: classref-enumeration + +enum **CollisionMode**: :ref:`🔗` + +.. _class_WorldScape3DCollision_constant_DISABLED: + +.. rst-class:: classref-enumeration-constant + +:ref:`CollisionMode` **DISABLED** = ``0`` + +No collision shapes will be generated. + +.. _class_WorldScape3DCollision_constant_DYNAMIC_GAME: + +.. rst-class:: classref-enumeration-constant + +:ref:`CollisionMode` **DYNAMIC_GAME** = ``1`` + +Collision shapes are generated around the camera as it moves; in game only. + +.. _class_WorldScape3DCollision_constant_DYNAMIC_EDITOR: + +.. rst-class:: classref-enumeration-constant + +:ref:`CollisionMode` **DYNAMIC_EDITOR** = ``2`` + +Collision shapes are generated around the camera as it moves; in the editor and in game. Enable ``View Gizmos`` in the viewport menu to see them. + +.. _class_WorldScape3DCollision_constant_FULL_GAME: + +.. rst-class:: classref-enumeration-constant + +:ref:`CollisionMode` **FULL_GAME** = ``3`` + +Collision shapes are generated for all regions in game only. + +.. _class_WorldScape3DCollision_constant_FULL_EDITOR: + +.. rst-class:: classref-enumeration-constant + +:ref:`CollisionMode` **FULL_EDITOR** = ``4`` + +Collision shapes are generated for all regions in the editor and in game. This mode is necessary for some 3rd party plugins to detect the terrain using collision. Enable ``View Gizmos`` in the viewport menu to see the collision mesh. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_WorldScape3DCollision_property_layer: + +.. rst-class:: classref-property + +:ref:`int` **layer** = ``1`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_layer**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_layer**\ (\ ) + +The physics layers the terrain lives on. Sets ``CollisionObject3D.collision_layer``. Also see :ref:`mask`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DCollision_property_mask: + +.. rst-class:: classref-property + +:ref:`int` **mask** = ``1`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_mask**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_mask**\ (\ ) + +The physics layers the physics body scans for colliding objects. Sets ``CollisionObject3D.collision_mask``. Also see :ref:`layer`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DCollision_property_mode: + +.. rst-class:: classref-property + +:ref:`CollisionMode` **mode** = ``1`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_mode**\ (\ value\: :ref:`CollisionMode`\ ) +- :ref:`CollisionMode` **get_mode**\ (\ ) + +The selected mode determines if collision is generated and how. See :ref:`CollisionMode` for details. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DCollision_property_physics_material: + +.. rst-class:: classref-property + +:ref:`PhysicsMaterial` **physics_material** :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_physics_material**\ (\ value\: :ref:`PhysicsMaterial`\ ) +- :ref:`PhysicsMaterial` **get_physics_material**\ (\ ) + +Applies a ``PhysicsMaterial`` override to the StaticBody. + +There's no ability built into Redot to change physics material parameters based on texture or any other factor. However, it might be possible to extend `PhysicsMaterial` in order to inject code into the queries. It would need references to an object position and a terrain, and then it could run :ref:`WorldScape3DData.get_texture_id()` based on the position and return different physics settings per texture. That would change the settings for the entire terrain for that moment. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DCollision_property_priority: + +.. rst-class:: classref-property + +:ref:`float` **priority** = ``1.0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_priority**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_priority**\ (\ ) + +The priority with which the physics server uses to solve collisions. The higher the priority, the lower the penetration of a colliding object. Sets ``CollisionObject3D.collision_priority``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DCollision_property_radius: + +.. rst-class:: classref-property + +:ref:`int` **radius** = ``64`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_radius**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_radius**\ (\ ) + +If :ref:`mode` is Dynamic, this is the distance range within which collision shapes will be generated. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DCollision_property_shape_size: + +.. rst-class:: classref-property + +:ref:`int` **shape_size** = ``16`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_shape_size**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_shape_size**\ (\ ) + +If :ref:`mode` is Dynamic, this is the size of each collision shape. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_WorldScape3DCollision_method_build: + +.. rst-class:: classref-method + +|void| **build**\ (\ ) :ref:`🔗` + +Creates collision shapes and calls :ref:`update()` to shape them. Calls :ref:`destroy()` first, so it is safe to call this to fully rebuild collision any time. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DCollision_method_destroy: + +.. rst-class:: classref-method + +|void| **destroy**\ (\ ) :ref:`🔗` + +Removes all collision shapes and frees any memory used. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DCollision_method_get_rid: + +.. rst-class:: classref-method + +:ref:`RID` **get_rid**\ (\ ) |const| :ref:`🔗` + +Returns the RID of the active StaticBody. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DCollision_method_is_dynamic_mode: + +.. rst-class:: classref-method + +:ref:`bool` **is_dynamic_mode**\ (\ ) |const| :ref:`🔗` + +Returns true if :ref:`mode` is ``Dynamic / Editor`` or ``Dynamic / Game``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DCollision_method_is_editor_mode: + +.. rst-class:: classref-method + +:ref:`bool` **is_editor_mode**\ (\ ) |const| :ref:`🔗` + +Returns true if :ref:`mode` is ``Full / Editor`` or ``Dynamic / Editor``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DCollision_method_is_enabled: + +.. rst-class:: classref-method + +:ref:`bool` **is_enabled**\ (\ ) |const| :ref:`🔗` + +Returns true if :ref:`mode` is not ``Disabled``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DCollision_method_update: + +.. rst-class:: classref-method + +|void| **update**\ (\ rebuild\: :ref:`bool` = false\ ) :ref:`🔗` + +- If :ref:`mode` is Full, recalculates the existing collision shapes. If regions have been added or removed, set ``rebuild`` to true or call :ref:`build()` instead. Can be slow. + +- If :ref:`mode` is Dynamic, repositions collision shapes around the camera and recalculates ones that moved. Set ``rebuild`` to true to recalculate all shapes within :ref:`radius`. This is very fast, and can be updated at 60fps for little cost. + +.. |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.)` diff --git a/classes/class_worldscape3ddata.rst b/classes/class_worldscape3ddata.rst new file mode 100644 index 00000000000..38f9168244c --- /dev/null +++ b/classes/class_worldscape3ddata.rst @@ -0,0 +1,1338 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Redot engine sources. +.. Generator: https://github.com/Redot-Engine/redot-engine/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/Redot-Engine/redot-engine/tree/master/modules/worldscape_3d/doc_classes/WorldScape3DData.xml. + +.. _class_WorldScape3DData: + +WorldScape3DData +================ + +**Inherits:** :ref:`Object` + +.. rst-class:: classref-introduction-group + +Description +----------- + +WorldScape3D divides all data into regions which fit on a grid in the world. These coordinates are called region locations. The map data are stored in instances of :ref:`WorldScape3DRegion`, which are saved to individual files. This class manages region loading, unloading, data retrieval and manipulation. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +--------------------------------------------------------------+---------------------------------------------------------------------------+--------+ + | :ref:`Array`\[:ref:`Image`\] | :ref:`color_maps` | ``[]`` | + +--------------------------------------------------------------+---------------------------------------------------------------------------+--------+ + | :ref:`Array`\[:ref:`Image`\] | :ref:`control_maps` | ``[]`` | + +--------------------------------------------------------------+---------------------------------------------------------------------------+--------+ + | :ref:`Array`\[:ref:`Image`\] | :ref:`height_maps` | ``[]`` | + +--------------------------------------------------------------+---------------------------------------------------------------------------+--------+ + | :ref:`Array`\[:ref:`Vector2i`\] | :ref:`region_locations` | ``[]`` | + +--------------------------------------------------------------+---------------------------------------------------------------------------+--------+ + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`add_region`\ (\ region\: :ref:`WorldScape3DRegion`, update\: :ref:`bool` = true\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`WorldScape3DRegion` | :ref:`add_region_blank`\ (\ region_location\: :ref:`Vector2i`, update\: :ref:`bool` = true\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`WorldScape3DRegion` | :ref:`add_region_blankp`\ (\ global_position\: :ref:`Vector3`, update\: :ref:`bool` = true\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`calc_height_range`\ (\ recursive\: :ref:`bool` = false\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`change_region_size`\ (\ region_size\: :ref:`int`\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`do_for_regions`\ (\ area\: :ref:`Rect2i`, callback\: :ref:`Callable`\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`export_image`\ (\ file_name\: :ref:`String`, map_type\: :ref:`MapType`\ ) |const| | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`get_color`\ (\ global_position\: :ref:`Vector3`\ ) |const| | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_color_maps_rid`\ (\ ) |const| | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_control`\ (\ global_position\: :ref:`Vector3`\ ) |const| | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_control_angle`\ (\ global_position\: :ref:`Vector3`\ ) |const| | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_control_auto`\ (\ global_position\: :ref:`Vector3`\ ) |const| | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_control_base_id`\ (\ global_position\: :ref:`Vector3`\ ) |const| | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_control_blend`\ (\ global_position\: :ref:`Vector3`\ ) |const| | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_control_hole`\ (\ global_position\: :ref:`Vector3`\ ) |const| | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_control_maps_rid`\ (\ ) |const| | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_control_navigation`\ (\ global_position\: :ref:`Vector3`\ ) |const| | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_control_overlay_id`\ (\ global_position\: :ref:`Vector3`\ ) |const| | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_control_scale`\ (\ global_position\: :ref:`Vector3`\ ) |const| | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_height`\ (\ global_position\: :ref:`Vector3`\ ) |const| | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_height_maps_rid`\ (\ ) |const| | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_height_range`\ (\ ) |const| | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`Image`\] | :ref:`get_maps`\ (\ map_type\: :ref:`MapType`\ ) |const| | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_mesh_vertex`\ (\ lod\: :ref:`int`, filter\: :ref:`HeightFilter`, global_position\: :ref:`Vector3`\ ) |const| | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_normal`\ (\ global_position\: :ref:`Vector3`\ ) |const| | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`get_pixel`\ (\ map_type\: :ref:`MapType`, global_position\: :ref:`Vector3`\ ) |const| | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`WorldScape3DRegion` | :ref:`get_region`\ (\ region_location\: :ref:`Vector2i`\ ) |const| | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_region_count`\ (\ ) |const| | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_region_id`\ (\ region_location\: :ref:`Vector2i`\ ) |const| | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_region_idp`\ (\ global_position\: :ref:`Vector3`\ ) |const| | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`get_region_location`\ (\ global_position\: :ref:`Vector3`\ ) |const| | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`get_region_map`\ (\ ) |const| | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_region_map_index`\ (\ region_location\: :ref:`Vector2i`\ ) |static| | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`WorldScape3DRegion` | :ref:`get_regionp`\ (\ global_position\: :ref:`Vector3`\ ) |const| | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`WorldScape3DRegion`\] | :ref:`get_regions_active`\ (\ copy\: :ref:`bool` = false, deep\: :ref:`bool` = false\ ) |const| | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`get_regions_all`\ (\ ) |const| | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_roughness`\ (\ global_position\: :ref:`Vector3`\ ) |const| | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_texture_id`\ (\ global_position\: :ref:`Vector3`\ ) |const| | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_region`\ (\ region_location\: :ref:`Vector2i`\ ) |const| | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_regionp`\ (\ global_position\: :ref:`Vector3`\ ) |const| | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`import_images`\ (\ images\: :ref:`Array`\[:ref:`Image`\], global_position\: :ref:`Vector3` = Vector3(0, 0, 0), offset\: :ref:`float` = 0.0, scale\: :ref:`float` = 1.0\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_in_slope`\ (\ global_position\: :ref:`Vector3`, slope_range\: :ref:`Vector2`, invert\: :ref:`bool` = false\ ) |const| | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_region_deleted`\ (\ region_location\: :ref:`Vector2i`\ ) |const| | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_region_modified`\ (\ region_location\: :ref:`Vector2i`\ ) |const| | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Image` | :ref:`layered_to_image`\ (\ map_type\: :ref:`MapType`\ ) |const| | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`load_directory`\ (\ directory\: :ref:`String`\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`load_region`\ (\ region_location\: :ref:`Vector2i`, directory\: :ref:`String`, update\: :ref:`bool` = true\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_region`\ (\ region\: :ref:`WorldScape3DRegion`, update\: :ref:`bool` = true\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_regionl`\ (\ region_location\: :ref:`Vector2i`, update\: :ref:`bool` = true\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_regionp`\ (\ global_position\: :ref:`Vector3`, update\: :ref:`bool` = true\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`save_directory`\ (\ directory\: :ref:`String`\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`save_region`\ (\ region_location\: :ref:`Vector2i`, directory\: :ref:`String`, save_16_bit\: :ref:`bool` = false\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_color`\ (\ global_position\: :ref:`Vector3`, color\: :ref:`Color`\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_control`\ (\ global_position\: :ref:`Vector3`, control\: :ref:`int`\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_control_angle`\ (\ global_position\: :ref:`Vector3`, degrees\: :ref:`float`\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_control_auto`\ (\ global_position\: :ref:`Vector3`, enable\: :ref:`bool`\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_control_base_id`\ (\ global_position\: :ref:`Vector3`, texture_id\: :ref:`int`\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_control_blend`\ (\ global_position\: :ref:`Vector3`, blend_value\: :ref:`float`\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_control_hole`\ (\ global_position\: :ref:`Vector3`, enable\: :ref:`bool`\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_control_navigation`\ (\ global_position\: :ref:`Vector3`, enable\: :ref:`bool`\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_control_overlay_id`\ (\ global_position\: :ref:`Vector3`, texture_id\: :ref:`int`\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_control_scale`\ (\ global_position\: :ref:`Vector3`, percentage_modifier\: :ref:`float`\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_height`\ (\ global_position\: :ref:`Vector3`, height\: :ref:`float`\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_pixel`\ (\ map_type\: :ref:`MapType`, global_position\: :ref:`Vector3`, pixel\: :ref:`Color`\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_region_deleted`\ (\ region_location\: :ref:`Vector2i`, deleted\: :ref:`bool`\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_region_modified`\ (\ region_location\: :ref:`Vector2i`, modified\: :ref:`bool`\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_roughness`\ (\ global_position\: :ref:`Vector3`, roughness\: :ref:`float`\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`update_maps`\ (\ map_type\: :ref:`MapType` = 3, all_regions\: :ref:`bool` = true, generate_mipmaps\: :ref:`bool` = false\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Signals +------- + +.. _class_WorldScape3DData_signal_color_maps_changed: + +.. rst-class:: classref-signal + +**color_maps_changed**\ (\ ) :ref:`🔗` + +Emitted when the color maps array is regenerated. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_signal_control_maps_changed: + +.. rst-class:: classref-signal + +**control_maps_changed**\ (\ ) :ref:`🔗` + +Emitted when the control maps array is regenerated. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_signal_height_maps_changed: + +.. rst-class:: classref-signal + +**height_maps_changed**\ (\ ) :ref:`🔗` + +Emitted when the height maps array is regenerated. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_signal_maps_changed: + +.. rst-class:: classref-signal + +**maps_changed**\ (\ ) :ref:`🔗` + +Emitted when the region map or any map array has been regenerated. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_signal_maps_edited: + +.. rst-class:: classref-signal + +**maps_edited**\ (\ edited_area\: :ref:`AABB`\ ) :ref:`🔗` + +This signal is emitted whenever the editor is used to: + +- add or remove a region + +- alter a region map with a brush tool + +- undo or redo any of the above operations + +The parameter contains the axis-aligned bounding box of the area edited. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_signal_region_map_changed: + +.. rst-class:: classref-signal + +**region_map_changed**\ (\ ) :ref:`🔗` + +Emitted when the region map is regenerated. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Enumerations +------------ + +.. _enum_WorldScape3DData_HeightFilter: + +.. rst-class:: classref-enumeration + +enum **HeightFilter**: :ref:`🔗` + +.. _class_WorldScape3DData_constant_HEIGHT_FILTER_NEAREST: + +.. rst-class:: classref-enumeration-constant + +:ref:`HeightFilter` **HEIGHT_FILTER_NEAREST** = ``0`` + +Samples the height map at the exact coordinates given. + +.. _class_WorldScape3DData_constant_HEIGHT_FILTER_MINIMUM: + +.. rst-class:: classref-enumeration-constant + +:ref:`HeightFilter` **HEIGHT_FILTER_MINIMUM** = ``1`` + +Samples (1 << lod) \* 2 heights around the given coordinates and returns the lowest. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Constants +--------- + +.. _class_WorldScape3DData_constant_REGION_MAP_SIZE: + +.. rst-class:: classref-constant + +**REGION_MAP_SIZE** = ``32`` :ref:`🔗` + +Hard coded number of regions on a side. The total number of regions is this squared. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_WorldScape3DData_property_color_maps: + +.. rst-class:: classref-property + +:ref:`Array`\[:ref:`Image`\] **color_maps** = ``[]`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- :ref:`Array`\[:ref:`Image`\] **get_color_maps**\ (\ ) + +An Array\ :ref:`Image` containing references to all of the color maps in all regions. See :ref:`WorldScape3DRegion.color_map`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_property_control_maps: + +.. rst-class:: classref-property + +:ref:`Array`\[:ref:`Image`\] **control_maps** = ``[]`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- :ref:`Array`\[:ref:`Image`\] **get_control_maps**\ (\ ) + +An Array\ :ref:`Image` containing references to all of the control maps in all regions. See :ref:`WorldScape3DRegion.control_map`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_property_height_maps: + +.. rst-class:: classref-property + +:ref:`Array`\[:ref:`Image`\] **height_maps** = ``[]`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- :ref:`Array`\[:ref:`Image`\] **get_height_maps**\ (\ ) + +An Array\ :ref:`Image` containing references to all of the height maps in all regions. See :ref:`WorldScape3DRegion.height_map`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_property_region_locations: + +.. rst-class:: classref-property + +:ref:`Array`\[:ref:`Vector2i`\] **region_locations** = ``[]`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_region_locations**\ (\ value\: :ref:`Array`\[:ref:`Vector2i`\]\ ) +- :ref:`Array`\[:ref:`Vector2i`\] **get_region_locations**\ (\ ) + +The array of all active region locations; those not marked for deletion. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_WorldScape3DData_method_add_region: + +.. rst-class:: classref-method + +:ref:`Error` **add_region**\ (\ region\: :ref:`WorldScape3DRegion`, update\: :ref:`bool` = true\ ) :ref:`🔗` + +Adds a region for sculpting and painting. + +The region should already be configured with the desired location and maps before sending to this function. + +Upon saving, this region will be written to a data file stored in :ref:`WorldScape3D.data_directory`. + +- update - regenerates the texture arrays if true. Set to false if bulk adding many regions, then true on the last one or use :ref:`update_maps()`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_method_add_region_blank: + +.. rst-class:: classref-method + +:ref:`WorldScape3DRegion` **add_region_blank**\ (\ region_location\: :ref:`Vector2i`, update\: :ref:`bool` = true\ ) :ref:`🔗` + +Creates and adds a blank region at the specified location. See :ref:`add_region()`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_method_add_region_blankp: + +.. rst-class:: classref-method + +:ref:`WorldScape3DRegion` **add_region_blankp**\ (\ global_position\: :ref:`Vector3`, update\: :ref:`bool` = true\ ) :ref:`🔗` + +Creates and adds a blank region at a region location encompassing the specified global position. See :ref:`add_region()`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_method_calc_height_range: + +.. rst-class:: classref-method + +|void| **calc_height_range**\ (\ recursive\: :ref:`bool` = false\ ) :ref:`🔗` + +Recalculates the master height range for the whole terrain by summing the height ranges of all active regions. + +Recursive mode does the same, but has each region recalculate heights from each heightmap pixel. See :ref:`WorldScape3DRegion.calc_height_range()`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_method_change_region_size: + +.. rst-class:: classref-method + +|void| **change_region_size**\ (\ region_size\: :ref:`int`\ ) :ref:`🔗` + +Reslices terrain data to fit the new region size. This is a destructive process for which there is no undo. However Redot does make an undo entry, which will reslice in reverse. Files on disk are not added or removed until the scene is saved. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_method_do_for_regions: + +.. rst-class:: classref-method + +|void| **do_for_regions**\ (\ area\: :ref:`Rect2i`, callback\: :ref:`Callable`\ ) :ref:`🔗` + +Calls the callback function for every region within the given area. If using vertex_spacing, area values should be descaled. + +The callable receives: source WorldScape3DRegion, source Rect2i, dest Rect2i, (bindings) + +You may wish to append .bind() to the callback to pass along variables. For instance internally this function is called when changing region size. We bind the destination WorldScape3DRegion, then use do_for_regions to copy segments of source regions to segments of destination regions. See the code for change_region_size() for more. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_method_export_image: + +.. rst-class:: classref-method + +:ref:`Error` **export_image**\ (\ file_name\: :ref:`String`, map_type\: :ref:`MapType`\ ) |const| :ref:`🔗` + +Exports the specified map type as one of r16/raw, exr, jpg, png, webp, res, tres. + +R16 or exr are recommended for roundtrip external editing. + +R16 can be edited by Krita, however you must know the dimensions and min/max before reimporting. This information is printed to the console. + +Res/tres stores in Redot's native data format. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_method_get_color: + +.. rst-class:: classref-method + +:ref:`Color` **get_color**\ (\ global_position\: :ref:`Vector3`\ ) |const| :ref:`🔗` + +Returns the associated pixel on the color map at the requested position. + +Returns ``Color(NAN, NAN, NAN, NAN)`` if the position is outside of defined regions. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_method_get_color_maps_rid: + +.. rst-class:: classref-method + +:ref:`RID` **get_color_maps_rid**\ (\ ) |const| :ref:`🔗` + +Returns the resource ID of the generated height map Texture Array sent to the shader. You can use this RID with the RenderingServer to set it as a shader parameter for a sampler2DArray uniform in your own shader. See `Tips `__ for an example. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_method_get_control: + +.. rst-class:: classref-method + +:ref:`int` **get_control**\ (\ global_position\: :ref:`Vector3`\ ) |const| :ref:`🔗` + +Returns the associated pixel on the control map at the requested position. + +Returns ``4,294,967,295`` aka ``UINT32_MAX`` if the position is outside of defined regions. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_method_get_control_angle: + +.. rst-class:: classref-method + +:ref:`float` **get_control_angle**\ (\ global_position\: :ref:`Vector3`\ ) |const| :ref:`🔗` + +Returns the angle, aka uv rotation, on the control map at the requested position. Values are fixed to 22.5 degree intervals, for a maximum of 16 angles. 360 / 16 = 22.5. + +Returns ``NAN`` if the position is outside of defined regions. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_method_get_control_auto: + +.. rst-class:: classref-method + +:ref:`bool` **get_control_auto**\ (\ global_position\: :ref:`Vector3`\ ) |const| :ref:`🔗` + +Returns whether the autoshader is enabled on the control map at the requested position. + +Returns ``false`` if the position is outside of defined regions. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_method_get_control_base_id: + +.. rst-class:: classref-method + +:ref:`int` **get_control_base_id**\ (\ global_position\: :ref:`Vector3`\ ) |const| :ref:`🔗` + +Returns the base texture ID on the control map at the requested position. Values are 0 - 31, which matches the ID of the texture asset in the asset dock. + +Returns ``4,294,967,295`` aka ``UINT32_MAX`` if the position is outside of defined regions. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_method_get_control_blend: + +.. rst-class:: classref-method + +:ref:`float` **get_control_blend**\ (\ global_position\: :ref:`Vector3`\ ) |const| :ref:`🔗` + +Returns the blend value between the base texture ID and the overlay texture ID. The value is clamped between 0.0 - 1.0 where 0.0 shows only the base texture, and 1.0 shows only the overlay texture. + +Returns ``NAN`` if the position is outside of defined regions. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_method_get_control_hole: + +.. rst-class:: classref-method + +:ref:`bool` **get_control_hole**\ (\ global_position\: :ref:`Vector3`\ ) |const| :ref:`🔗` + +Returns whether there is a hole on the control map at the requested position. + +Returns ``false`` if the position is outside of defined regions. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_method_get_control_maps_rid: + +.. rst-class:: classref-method + +:ref:`RID` **get_control_maps_rid**\ (\ ) |const| :ref:`🔗` + +Returns the resource ID of the generated control map Texture Array sent to the shader. You can use this RID with the RenderingServer to set it as a shader parameter for a sampler2DArray uniform in your own shader. See `Tips `__ for an example. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_method_get_control_navigation: + +.. rst-class:: classref-method + +:ref:`bool` **get_control_navigation**\ (\ global_position\: :ref:`Vector3`\ ) |const| :ref:`🔗` + +Returns whether navigation is enabled on the control map at the requested position. + +Returns ``false`` if the position is outside of defined regions. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_method_get_control_overlay_id: + +.. rst-class:: classref-method + +:ref:`int` **get_control_overlay_id**\ (\ global_position\: :ref:`Vector3`\ ) |const| :ref:`🔗` + +Returns the overlay texture ID on the control map at the requested position. Values are 0 - 31, which matches the ID of the texture asset in the asset dock. + +Returns ``4,294,967,295`` aka ``UINT32_MAX`` if the position is outside of defined regions. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_method_get_control_scale: + +.. rst-class:: classref-method + +:ref:`float` **get_control_scale**\ (\ global_position\: :ref:`Vector3`\ ) |const| :ref:`🔗` + +Returns the uv scale on the control map at the requested position. The value is rounded to the nearest 20% difference from 100%, ranging between -60% to +80%. Eg. +20% or -40%. + +Returns ``NAN`` if the position is outside of defined regions. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_method_get_height: + +.. rst-class:: classref-method + +:ref:`float` **get_height**\ (\ global_position\: :ref:`Vector3`\ ) |const| :ref:`🔗` + +Returns the height at the requested position. If the position is close to a vertex, the pixel height on the heightmap is returned. Otherwise the value is interpolated from the 4 vertices surrounding the position. + +Returns ``NAN`` if the requested position is a hole or outside of defined regions. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_method_get_height_maps_rid: + +.. rst-class:: classref-method + +:ref:`RID` **get_height_maps_rid**\ (\ ) |const| :ref:`🔗` + +Returns the resource ID of the generated height map texture array sent to the shader. You can use this RID with the RenderingServer to set it as a shader parameter for a sampler2DArray uniform in your own shader. See `Tips `__ for an example. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_method_get_height_range: + +.. rst-class:: classref-method + +:ref:`Vector2` **get_height_range**\ (\ ) |const| :ref:`🔗` + +Returns the highest and lowest heights for the sculpted terrain used to set the world AABB. See :ref:`calc_height_range()`. + +Any :ref:`WorldScape3DMaterial.world_background` used that extends the mesh outside of this range will not change this variable. You need to set :ref:`WorldScape3D.cull_margin` or the renderer will clip meshes. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_method_get_maps: + +.. rst-class:: classref-method + +:ref:`Array`\[:ref:`Image`\] **get_maps**\ (\ map_type\: :ref:`MapType`\ ) |const| :ref:`🔗` + +Returns an Array of Images from all regions of the specified map type. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_method_get_mesh_vertex: + +.. rst-class:: classref-method + +:ref:`Vector3` **get_mesh_vertex**\ (\ lod\: :ref:`int`, filter\: :ref:`HeightFilter`, global_position\: :ref:`Vector3`\ ) |const| :ref:`🔗` + +Returns the position of a terrain vertex at a certain LOD. If the position is outside of defined regions or there is a hole, it returns ``NAN`` in the vector's Y coordinate. + +\ ``lod`` - Determines how many heights around the given global position will be sampled. Range 0 - 8. + +\ ``filter`` - Specifies how samples are filtered. See :ref:`HeightFilter`. + +\ ``global_position`` - X and Z coordinates of the vertex. Heights will be sampled around these coordinates. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_method_get_normal: + +.. rst-class:: classref-method + +:ref:`Vector3` **get_normal**\ (\ global_position\: :ref:`Vector3`\ ) |const| :ref:`🔗` + +Returns the terrain normal at the specified position. This function uses :ref:`get_height()`. + +Returns ``Vector3(NAN, NAN, NAN)`` if the requested position is a hole or outside of defined regions. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_method_get_pixel: + +.. rst-class:: classref-method + +:ref:`Color` **get_pixel**\ (\ map_type\: :ref:`MapType`, global_position\: :ref:`Vector3`\ ) |const| :ref:`🔗` + +Returns the pixel for the map type associated with the specified position. + +Returns ``Color(NAN, NAN, NAN, NAN)`` if the position is outside of defined regions. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_method_get_region: + +.. rst-class:: classref-method + +:ref:`WorldScape3DRegion` **get_region**\ (\ region_location\: :ref:`Vector2i`\ ) |const| :ref:`🔗` + +Return the :ref:`WorldScape3DRegion` at the specified location. This will return inactive regions marked for deletion. Check with :ref:`WorldScape3DRegion.deleted`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_method_get_region_count: + +.. rst-class:: classref-method + +:ref:`int` **get_region_count**\ (\ ) |const| :ref:`🔗` + +Returns the number of active regions; those not marked for deletion. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_method_get_region_id: + +.. rst-class:: classref-method + +:ref:`int` **get_region_id**\ (\ region_location\: :ref:`Vector2i`\ ) |const| :ref:`🔗` + +Returns -1 if no region or out of bounds at the given location, otherwise returns the current region id. + +The region_id is the index into the TextureArrays sent to the shader, and can change at any time. Gamedevs should generally index regions by location. However, this function is useful to determine if the location is a valid region. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_method_get_region_idp: + +.. rst-class:: classref-method + +:ref:`int` **get_region_idp**\ (\ global_position\: :ref:`Vector3`\ ) |const| :ref:`🔗` + +Returns the region id at a global position. See :ref:`get_region_id()`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_method_get_region_location: + +.. rst-class:: classref-method + +:ref:`Vector2i` **get_region_location**\ (\ global_position\: :ref:`Vector3`\ ) |const| :ref:`🔗` + +Returns the calculated region location for the given global position. This is just a calculation and does no bounds checking or verification that a region exists. See :ref:`get_region_map_index()` for bounds checking, or :ref:`has_region()` for checking existence. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_method_get_region_map: + +.. rst-class:: classref-method + +:ref:`PackedInt32Array` **get_region_map**\ (\ ) |const| :ref:`🔗` + +Returns a fully populated 32 x 32 array. The array location contains the region id + 1, or 0, which means no region. + +See :ref:`get_region_map_index()`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_method_get_region_map_index: + +.. rst-class:: classref-method + +:ref:`int` **get_region_map_index**\ (\ region_location\: :ref:`Vector2i`\ ) |static| :ref:`🔗` + +Given a region location, returns the index into the region map array. See :ref:`get_region_map()`. + +You can use this function to quickly determine if a location is within the greater world bounds (-16,-16) to (15, 15). It returns -1 if not. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_method_get_regionp: + +.. rst-class:: classref-method + +:ref:`WorldScape3DRegion` **get_regionp**\ (\ global_position\: :ref:`Vector3`\ ) |const| :ref:`🔗` + +Returns the region at the specified global position. This will return inactive regions marked for deletion. Check with :ref:`WorldScape3DRegion.deleted`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_method_get_regions_active: + +.. rst-class:: classref-method + +:ref:`Array`\[:ref:`WorldScape3DRegion`\] **get_regions_active**\ (\ copy\: :ref:`bool` = false, deep\: :ref:`bool` = false\ ) |const| :ref:`🔗` + +Returns an array of active regions not marked for deletion. Each region knows its own location. See :ref:`WorldScape3DRegion.location`. + +- copy - returns a shallow copy of the regions; region map references are copied. + +- deep - returns a deep copy of the regions; region maps are full duplicates. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_method_get_regions_all: + +.. rst-class:: classref-method + +:ref:`Dictionary` **get_regions_all**\ (\ ) |const| :ref:`🔗` + +Returns all regions in a dictionary indexed by region location. Some regions may be marked for deletion. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_method_get_roughness: + +.. rst-class:: classref-method + +:ref:`float` **get_roughness**\ (\ global_position\: :ref:`Vector3`\ ) |const| :ref:`🔗` + +Returns the roughness modifier (wetness) on the color map alpha channel associated with the specified position. + +Returns ``Color(NAN, NAN, NAN, NAN)`` if the position is outside of defined regions. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_method_get_texture_id: + +.. rst-class:: classref-method + +:ref:`Vector3` **get_texture_id**\ (\ global_position\: :ref:`Vector3`\ ) |const| :ref:`🔗` + +Returns ``Vector3(base texture id, overlay id, blend value)``. + +Returns ``Vector3(NAN, NAN, NAN)`` if the position is a hole or outside of defined regions. + +This is often used for playing sounds on footsteps. It's up to the gamedev to determine which is visually apparent based on shader settings. + +Due to blending, it won't be pixel perfect. Try having your player controller print this value while walking around to see how the blending values look. Perhaps you'll find that the overlay texture is visible starting at a blend value of .3 to .5, otherwise the base is visible. You can also observe the control blend debug view with :ref:`WorldScape3DMaterial.show_control_blend`. + +Observing how this is done in The Witcher 3, there are only about 6 sounds used (snow, foliage, dirt, gravel, rock, wood), and except for wood, they are not pixel perfect. Wood is easy to do by detecting if the player is walking on wood meshes. The other 5 sounds are played when the player is in an area where the textures are blending. So it might play rock while over a dirt area. This shows pixel perfect accuracy is not important. It will still provide a seamless audio visual experience. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_method_has_region: + +.. rst-class:: classref-method + +:ref:`bool` **has_region**\ (\ region_location\: :ref:`Vector2i`\ ) |const| :ref:`🔗` + +Returns true if the specified region location has an active region. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_method_has_regionp: + +.. rst-class:: classref-method + +:ref:`bool` **has_regionp**\ (\ global_position\: :ref:`Vector3`\ ) |const| :ref:`🔗` + +Returns true if the specified global position has an active region. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_method_import_images: + +.. rst-class:: classref-method + +|void| **import_images**\ (\ images\: :ref:`Array`\[:ref:`Image`\], global_position\: :ref:`Vector3` = Vector3(0, 0, 0), offset\: :ref:`float` = 0.0, scale\: :ref:`float` = 1.0\ ) :ref:`🔗` + +Imports an Image set (Height, Control, Color) into this resource. It does NOT normalize values to 0-1. You must do that using get_min_max() and adjusting scale and offset. + +\ ``images`` - MapType.TYPE_MAX sized array of Images for Height, Control, Color. Images can be blank or null. + +\ ``global_position`` - X,0,Z position on the region map. Valid range is :ref:`WorldScape3D.vertex_spacing` \* :ref:`WorldScape3D.region_size` \* (+/-16, +/-16). + +\ ``offset`` - Add this factor to all height values, can be negative. + +\ ``scale`` - Scale all height values by this factor (applied after offset). + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_method_is_in_slope: + +.. rst-class:: classref-method + +:ref:`bool` **is_in_slope**\ (\ global_position\: :ref:`Vector3`, slope_range\: :ref:`Vector2`, invert\: :ref:`bool` = false\ ) |const| :ref:`🔗` + +Returns true if the slope of the terrain at the given position is within the slope range. If invert is true, it returns true if the position is outside the given range. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_method_is_region_deleted: + +.. rst-class:: classref-method + +:ref:`bool` **is_region_deleted**\ (\ region_location\: :ref:`Vector2i`\ ) |const| :ref:`🔗` + +Returns true if the region at the location exists and is marked as deleted. Syntactic sugar for :ref:`WorldScape3DRegion.deleted`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_method_is_region_modified: + +.. rst-class:: classref-method + +:ref:`bool` **is_region_modified**\ (\ region_location\: :ref:`Vector2i`\ ) |const| :ref:`🔗` + +Returns true if the region at the location exists and is marked as modified. Syntactic sugar for :ref:`WorldScape3DRegion.modified`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_method_layered_to_image: + +.. rst-class:: classref-method + +:ref:`Image` **layered_to_image**\ (\ map_type\: :ref:`MapType`\ ) |const| :ref:`🔗` + +Returns an Image of the given map type that contains all regions in one large image. If the world has multiple islands, this function will return an image large enough to encompass all used regions, with black areas in between the islands. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_method_load_directory: + +.. rst-class:: classref-method + +|void| **load_directory**\ (\ directory\: :ref:`String`\ ) :ref:`🔗` + +Loads all of the WorldScape3DRegion files found in the specified directory. Then it rebuilds all map arrays. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_method_load_region: + +.. rst-class:: classref-method + +|void| **load_region**\ (\ region_location\: :ref:`Vector2i`, directory\: :ref:`String`, update\: :ref:`bool` = true\ ) :ref:`🔗` + +Loads the specified region location file. + +- update - rebuild maps if true. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_method_remove_region: + +.. rst-class:: classref-method + +|void| **remove_region**\ (\ region\: :ref:`WorldScape3DRegion`, update\: :ref:`bool` = true\ ) :ref:`🔗` + +Marks the specified region as deleted. This deactivates it so it won't render it on screen once maps are updated, unless marked not deleted. The file will be deleted from disk upon saving. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_method_remove_regionl: + +.. rst-class:: classref-method + +|void| **remove_regionl**\ (\ region_location\: :ref:`Vector2i`, update\: :ref:`bool` = true\ ) :ref:`🔗` + +Removes the region at the specified location. See :ref:`remove_region()`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_method_remove_regionp: + +.. rst-class:: classref-method + +|void| **remove_regionp**\ (\ global_position\: :ref:`Vector3`, update\: :ref:`bool` = true\ ) :ref:`🔗` + +Removes the region at the specified global_position. See :ref:`remove_region()`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_method_save_directory: + +.. rst-class:: classref-method + +|void| **save_directory**\ (\ directory\: :ref:`String`\ ) :ref:`🔗` + +This saves all active regions into the specified directory. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_method_save_region: + +.. rst-class:: classref-method + +|void| **save_region**\ (\ region_location\: :ref:`Vector2i`, directory\: :ref:`String`, save_16_bit\: :ref:`bool` = false\ ) :ref:`🔗` + +Saves the specified active region to the directory. See :ref:`WorldScape3DRegion.save()`. + +- region_location - the region to save. + +- 16_bit - converts the edited 32-bit heightmap to 16-bit. This is a lossy operation. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_method_set_color: + +.. rst-class:: classref-method + +|void| **set_color**\ (\ global_position\: :ref:`Vector3`, color\: :ref:`Color`\ ) :ref:`🔗` + +Sets the color on the color map pixel associated with the specified position. See :ref:`set_pixel()` for important information. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_method_set_control: + +.. rst-class:: classref-method + +|void| **set_control**\ (\ global_position\: :ref:`Vector3`, control\: :ref:`int`\ ) :ref:`🔗` + +Sets the value on the control map pixel associated with the specified position. See :ref:`set_pixel()` for important information. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_method_set_control_angle: + +.. rst-class:: classref-method + +|void| **set_control_angle**\ (\ global_position\: :ref:`Vector3`, degrees\: :ref:`float`\ ) :ref:`🔗` + +Sets the angle, aka uv rotation, on the control map at the requested position. Values are rounded to the nearest 22.5 degree interval, for a maximum of 16 angles. 360 / 16 = 22.5. + +See :ref:`set_pixel()` for important information. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_method_set_control_auto: + +.. rst-class:: classref-method + +|void| **set_control_auto**\ (\ global_position\: :ref:`Vector3`, enable\: :ref:`bool`\ ) :ref:`🔗` + +Sets if the material should render the autoshader or manual texturing on the control map at the requested position. + +See :ref:`set_pixel()` for important information. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_method_set_control_base_id: + +.. rst-class:: classref-method + +|void| **set_control_base_id**\ (\ global_position\: :ref:`Vector3`, texture_id\: :ref:`int`\ ) :ref:`🔗` + +Sets the base texture ID on the control map at the requested position. Values are clamped to 0 - 31, matching the ID of the texture asset in the asset dock. + +See :ref:`set_pixel()` for important information. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_method_set_control_blend: + +.. rst-class:: classref-method + +|void| **set_control_blend**\ (\ global_position\: :ref:`Vector3`, blend_value\: :ref:`float`\ ) :ref:`🔗` + +Sets the blend value between the base texture ID, and the overlay texture ID. The value is clamped between 0.0 - 1.0 where 0.0 shows only the base texture, and 1.0 shows only the overlay texture. + +See :ref:`set_pixel()` for important information. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_method_set_control_hole: + +.. rst-class:: classref-method + +|void| **set_control_hole**\ (\ global_position\: :ref:`Vector3`, enable\: :ref:`bool`\ ) :ref:`🔗` + +Sets if a hole should be rendered on the control map at the requested position. See :ref:`set_pixel()` for important information. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_method_set_control_navigation: + +.. rst-class:: classref-method + +|void| **set_control_navigation**\ (\ global_position\: :ref:`Vector3`, enable\: :ref:`bool`\ ) :ref:`🔗` + +Sets if navigation generation is enabled on the control map at the requested position. See :ref:`set_pixel()` for important information. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_method_set_control_overlay_id: + +.. rst-class:: classref-method + +|void| **set_control_overlay_id**\ (\ global_position\: :ref:`Vector3`, texture_id\: :ref:`int`\ ) :ref:`🔗` + +Sets the overlay texture ID on the control map at the requested position. Values are clamped to 0 - 31, matching the ID of the texture asset in the asset dock. + +See :ref:`set_pixel()` for important information. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_method_set_control_scale: + +.. rst-class:: classref-method + +|void| **set_control_scale**\ (\ global_position\: :ref:`Vector3`, percentage_modifier\: :ref:`float`\ ) :ref:`🔗` + +Sets the uv scale on the control map at the requested position. The value is rounded to the nearest 20% difference from 100%, ranging between -60% to +80%. + +See :ref:`set_pixel()` for important information. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_method_set_height: + +.. rst-class:: classref-method + +|void| **set_height**\ (\ global_position\: :ref:`Vector3`, height\: :ref:`float`\ ) :ref:`🔗` + +Sets the height value on the heightmap pixel associated with the specified position. See :ref:`set_pixel()` for important information. + +Unlike :ref:`get_height()`, which interpolates between vertices, this function does not and will set the pixel at floored coordinates. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_method_set_pixel: + +.. rst-class:: classref-method + +|void| **set_pixel**\ (\ map_type\: :ref:`MapType`, global_position\: :ref:`Vector3`, pixel\: :ref:`Color`\ ) :ref:`🔗` + +Sets the pixel for the map type associated with the specified position. This method is fine for setting a few pixels, but if you wish to modify thousands of pixels quickly, you should get the region and use :ref:`WorldScape3DRegion.get_map()`, then edit the images directly. + +After setting pixels you need to call :ref:`update_maps()`. You may also need to regenerate collision if you don't have dynamic collision enabled. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_method_set_region_deleted: + +.. rst-class:: classref-method + +|void| **set_region_deleted**\ (\ region_location\: :ref:`Vector2i`, deleted\: :ref:`bool`\ ) :ref:`🔗` + +Marks a region as deleted. It will stop displaying when maps are updated. The file will be removed on save. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_method_set_region_modified: + +.. rst-class:: classref-method + +|void| **set_region_modified**\ (\ region_location\: :ref:`Vector2i`, modified\: :ref:`bool`\ ) :ref:`🔗` + +Sets the region as modified. It will be written to disk when saved. Syntactic sugar for :ref:`WorldScape3DRegion.modified`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_method_set_roughness: + +.. rst-class:: classref-method + +|void| **set_roughness**\ (\ global_position\: :ref:`Vector3`, roughness\: :ref:`float`\ ) :ref:`🔗` + +Sets the roughness modifier (wetness) on the color map alpha channel associated with the specified position. See :ref:`set_pixel()` for important information. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DData_method_update_maps: + +.. rst-class:: classref-method + +|void| **update_maps**\ (\ map_type\: :ref:`MapType` = 3, all_regions\: :ref:`bool` = true, generate_mipmaps\: :ref:`bool` = false\ ) :ref:`🔗` + +Regenerates the region map and the TextureArrays that combine the requested map types. This function needs to be called after editing any of the maps. + +By default, this function rebuilds all maps for all regions. + +- map_type - Regenerate only maps of this type. + +- all_regions - Regenerate all regions if true, otherwise only those marked with :ref:`WorldScape3DRegion.edited`. + +- generate_mipmaps - Regenerate mipmaps if map_type is color or all (max), for the regions specified above. This can also be done on individual regions before calling this function with ``region.get_color_map().generate_mipmaps()``. + +For frequent editing, rather than enabling all_regions, it is more optimal to only update changed regions as follows: + +:: + + terrain.data.set_height(global_position, 10.0) + var region:WorldScape3DRegion = terrain.data.get_regionp(global_position) + region.set_edited(true) + terrain.data.update_maps(WorldScape3DRegion.TYPE_HEIGHT, false) + region.set_edited(false) + +.. |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.)` diff --git a/classes/class_worldscape3deditor.rst b/classes/class_worldscape3deditor.rst new file mode 100644 index 00000000000..bb3ac7970c2 --- /dev/null +++ b/classes/class_worldscape3deditor.rst @@ -0,0 +1,408 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Redot engine sources. +.. Generator: https://github.com/Redot-Engine/redot-engine/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/Redot-Engine/redot-engine/tree/master/modules/worldscape_3d/doc_classes/WorldScape3DEditor.xml. + +.. _class_WorldScape3DEditor: + +WorldScape3DEditor +================== + +**Inherits:** :ref:`Object` + +.. rst-class:: classref-introduction-group + +Description +----------- + +This class handles all of the sculpting and painting operations for WorldScape3D. + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`apply_undo`\ (\ data\: :ref:`Dictionary`\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`backup_region`\ (\ region\: :ref:`WorldScape3DRegion`\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Operation` | :ref:`get_operation`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`WorldScape3D` | :ref:`get_terrain`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Tool` | :ref:`get_tool`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_operating`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`operate`\ (\ position\: :ref:`Vector3`, camera_direction\: :ref:`float`\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_brush_data`\ (\ data\: :ref:`Dictionary`\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_operation`\ (\ operation\: :ref:`Operation`\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_terrain`\ (\ terrain\: :ref:`WorldScape3D`\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_tool`\ (\ tool\: :ref:`Tool`\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`start_operation`\ (\ position\: :ref:`Vector3`\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`stop_operation`\ (\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Enumerations +------------ + +.. _enum_WorldScape3DEditor_Operation: + +.. rst-class:: classref-enumeration + +enum **Operation**: :ref:`🔗` + +.. _class_WorldScape3DEditor_constant_ADD: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operation` **ADD** = ``0`` + +Additive operations. + +.. _class_WorldScape3DEditor_constant_SUBTRACT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operation` **SUBTRACT** = ``1`` + +Subtractive operations. + +.. _class_WorldScape3DEditor_constant_REPLACE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operation` **REPLACE** = ``2`` + +Replacing operations. + +.. _class_WorldScape3DEditor_constant_AVERAGE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operation` **AVERAGE** = ``3`` + +Averaging operations. + +.. _class_WorldScape3DEditor_constant_GRADIENT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operation` **GRADIENT** = ``4`` + +Gradient operations. + +.. _class_WorldScape3DEditor_constant_OP_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`Operation` **OP_MAX** = ``5`` + +The number of elements in this enum. + +.. rst-class:: classref-item-separator + +---- + +.. _enum_WorldScape3DEditor_Tool: + +.. rst-class:: classref-enumeration + +enum **Tool**: :ref:`🔗` + +.. _class_WorldScape3DEditor_constant_SCULPT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Tool` **SCULPT** = ``1`` + +.. container:: contribute + + There is currently no description for this enum. Please help us by `contributing one `__! + + + +.. _class_WorldScape3DEditor_constant_HEIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Tool` **HEIGHT** = ``2`` + +Sculpt heights. + +.. _class_WorldScape3DEditor_constant_TEXTURE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Tool` **TEXTURE** = ``3`` + +Paint textures. + +.. _class_WorldScape3DEditor_constant_COLOR: + +.. rst-class:: classref-enumeration-constant + +:ref:`Tool` **COLOR** = ``4`` + +Paint on the color map. + +.. _class_WorldScape3DEditor_constant_ROUGHNESS: + +.. rst-class:: classref-enumeration-constant + +:ref:`Tool` **ROUGHNESS** = ``5`` + +Paint a roughness modifier, aka wetness. + +.. _class_WorldScape3DEditor_constant_ANGLE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Tool` **ANGLE** = ``10`` + +Paint textures rotated by an angle. + +.. _class_WorldScape3DEditor_constant_SCALE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Tool` **SCALE** = ``11`` + +Paint textures scaled by a value. + +.. _class_WorldScape3DEditor_constant_AUTOSHADER: + +.. rst-class:: classref-enumeration-constant + +:ref:`Tool` **AUTOSHADER** = ``6`` + +Paint where the shader automatically textures. + +.. _class_WorldScape3DEditor_constant_HOLES: + +.. rst-class:: classref-enumeration-constant + +:ref:`Tool` **HOLES** = ``7`` + +Paint where vertices will be invalidated to leave holes. + +.. _class_WorldScape3DEditor_constant_NAVIGATION: + +.. rst-class:: classref-enumeration-constant + +:ref:`Tool` **NAVIGATION** = ``8`` + +Paint where navigation will be generated. + +.. _class_WorldScape3DEditor_constant_INSTANCER: + +.. rst-class:: classref-enumeration-constant + +:ref:`Tool` **INSTANCER** = ``9`` + +Paint MultiMesh instances on the ground. + +.. _class_WorldScape3DEditor_constant_REGION: + +.. rst-class:: classref-enumeration-constant + +:ref:`Tool` **REGION** = ``0`` + +Add/remove regions. + +.. _class_WorldScape3DEditor_constant_TOOL_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`Tool` **TOOL_MAX** = ``12`` + +The number of elements in this enum. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_WorldScape3DEditor_method_apply_undo: + +.. rst-class:: classref-method + +|void| **apply_undo**\ (\ data\: :ref:`Dictionary`\ ) :ref:`🔗` + +Undo the previous changes, with the provided data. Used by Redot, not gamedevs. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DEditor_method_backup_region: + +.. rst-class:: classref-method + +|void| **backup_region**\ (\ region\: :ref:`WorldScape3DRegion`\ ) :ref:`🔗` + +Adds a region to the currently pending operation undo snapshot. :ref:`is_operating()` must be true. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DEditor_method_get_operation: + +.. rst-class:: classref-method + +:ref:`Operation` **get_operation**\ (\ ) |const| :ref:`🔗` + +Returns the current selected tool operation (eg. add, subtract). + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DEditor_method_get_terrain: + +.. rst-class:: classref-method + +:ref:`WorldScape3D` **get_terrain**\ (\ ) |const| :ref:`🔗` + +Returns the instance of WorldScape3D this class is connected to. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DEditor_method_get_tool: + +.. rst-class:: classref-method + +:ref:`Tool` **get_tool**\ (\ ) |const| :ref:`🔗` + +Returns the current tool selected in the editor plugin. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DEditor_method_is_operating: + +.. rst-class:: classref-method + +:ref:`bool` **is_operating**\ (\ ) |const| :ref:`🔗` + +Returns true if currently in the middle of a brushing operation. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DEditor_method_operate: + +.. rst-class:: classref-method + +|void| **operate**\ (\ position\: :ref:`Vector3`, camera_direction\: :ref:`float`\ ) :ref:`🔗` + +Start brushing. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DEditor_method_set_brush_data: + +.. rst-class:: classref-method + +|void| **set_brush_data**\ (\ data\: :ref:`Dictionary`\ ) :ref:`🔗` + +Sets all brush settings used in the editor plugin. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DEditor_method_set_operation: + +.. rst-class:: classref-method + +|void| **set_operation**\ (\ operation\: :ref:`Operation`\ ) :ref:`🔗` + +Sets the tool operation used in the editor plugin. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DEditor_method_set_terrain: + +.. rst-class:: classref-method + +|void| **set_terrain**\ (\ terrain\: :ref:`WorldScape3D`\ ) :ref:`🔗` + +Sets the instance of WorldScape3D this class is connected to. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DEditor_method_set_tool: + +.. rst-class:: classref-method + +|void| **set_tool**\ (\ tool\: :ref:`Tool`\ ) :ref:`🔗` + +Sets the tool selected in the editor plugin. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DEditor_method_start_operation: + +.. rst-class:: classref-method + +|void| **start_operation**\ (\ position\: :ref:`Vector3`\ ) :ref:`🔗` + +Begin a sculpting or painting operation. Prepares to create an undo/redo commit. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DEditor_method_stop_operation: + +.. rst-class:: classref-method + +|void| **stop_operation**\ (\ ) :ref:`🔗` + +End a sculpting or painting operation. Commits any regions marked with :ref:`WorldScape3DRegion.edited` in the undo/redo system and clears that flag. + +.. |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.)` diff --git a/classes/class_worldscape3dinstancer.rst b/classes/class_worldscape3dinstancer.rst new file mode 100644 index 00000000000..de81efc47ff --- /dev/null +++ b/classes/class_worldscape3dinstancer.rst @@ -0,0 +1,277 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Redot engine sources. +.. Generator: https://github.com/Redot-Engine/redot-engine/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/Redot-Engine/redot-engine/tree/master/modules/worldscape_3d/doc_classes/WorldScape3DInstancer.xml. + +.. _class_WorldScape3DInstancer: + +WorldScape3DInstancer +===================== + +**Inherits:** :ref:`Object` + +.. rst-class:: classref-introduction-group + +Description +----------- + +This class places mesh instances defined in the WorldScape3D asset dock into MultiMeshInstance3Ds on the ground. + +Data is currently stored in :ref:`WorldScape3DRegion.instances` and loaded into MultiMeshInstances, which are attached to the scene tree and managed by this class. + +\ **The methods available for adding instances are:**\ + +- :ref:`add_transforms()` - Accepts your list of transforms and parses them by region and cell location and stores in our data storage. Recommended for general API instancing. + +- :ref:`add_multimesh()` - Pulls the transforms out of your MultiMesh and calls add_transforms. + +- :ref:`add_instances()` - A feature rich function designed for hand editing. + +- Creating your own instance data and inserting it directly into :ref:`WorldScape3DRegion.instances`. It's not difficult to do this in GDScript, but a thorough understanding of the C++ code in this class is recommended. + +\ **The methods available for removing instances are:**\ + +- :ref:`remove_instances()` - Like add_instances, this is can be used procedurally but is designed for hand editing. + +- :ref:`clear_by_mesh()`, :ref:`clear_by_location()` - To erase large sections of instances + +- Editing :ref:`WorldScape3DRegion.instances` directly. + +After modifying region data, run :ref:`update_mmis()` to rebuild the MultiMeshInstance3Ds. + +\ **Read More:** `MultiMesh `__ + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +--------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_instances`\ (\ global_position\: :ref:`Vector3`, params\: :ref:`Dictionary`\ ) | + +--------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_multimesh`\ (\ mesh_id\: :ref:`int`, multimesh\: :ref:`MultiMesh`, transform\: :ref:`Transform3D` = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0), update\: :ref:`bool` = true\ ) | + +--------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_transforms`\ (\ mesh_id\: :ref:`int`, transforms\: :ref:`Array`\[:ref:`Transform3D`\], colors\: :ref:`PackedColorArray` = PackedColorArray(), update\: :ref:`bool` = true\ ) | + +--------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`append_location`\ (\ region_location\: :ref:`Vector2i`, mesh_id\: :ref:`int`, transforms\: :ref:`Array`\[:ref:`Transform3D`\], colors\: :ref:`PackedColorArray`, update\: :ref:`bool` = true\ ) | + +--------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`append_region`\ (\ region\: :ref:`WorldScape3DRegion`, mesh_id\: :ref:`int`, transforms\: :ref:`Array`\[:ref:`Transform3D`\], colors\: :ref:`PackedColorArray`, update\: :ref:`bool` = true\ ) | + +--------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_by_location`\ (\ region_location\: :ref:`Vector2i`, mesh_id\: :ref:`int`\ ) | + +--------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_by_mesh`\ (\ mesh_id\: :ref:`int`\ ) | + +--------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_by_region`\ (\ region\: :ref:`WorldScape3DRegion`, mesh_id\: :ref:`int`\ ) | + +--------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`dump_data`\ (\ ) | + +--------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`dump_mmis`\ (\ ) | + +--------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_instances`\ (\ global_position\: :ref:`Vector3`, params\: :ref:`Dictionary`\ ) | + +--------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`swap_ids`\ (\ src_id\: :ref:`int`, dest_id\: :ref:`int`\ ) | + +--------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`update_mmis`\ (\ rebuild\: :ref:`bool` = false\ ) | + +--------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`update_transforms`\ (\ aabb\: :ref:`AABB`\ ) | + +--------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_WorldScape3DInstancer_method_add_instances: + +.. rst-class:: classref-method + +|void| **add_instances**\ (\ global_position\: :ref:`Vector3`, params\: :ref:`Dictionary`\ ) :ref:`🔗` + +Used during terrain editing to place instances, given many brush parameters. In addition to the brush position, it also uses the following parameters: asset_id, size, strength, fixed_scale, random_scale, fixed_spin, random_spin, fixed_tilt, random_tilt, align_to_normal, height_offset, random_height, vertex_color, random_hue, random_darken. All of these settings are set in the editor through tool_settings.gd. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DInstancer_method_add_multimesh: + +.. rst-class:: classref-method + +|void| **add_multimesh**\ (\ mesh_id\: :ref:`int`, multimesh\: :ref:`MultiMesh`, transform\: :ref:`Transform3D` = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0), update\: :ref:`bool` = true\ ) :ref:`🔗` + +Allows procedural placement of meshes, or importing from another MultiMeshInstancer placement tool. The specified mesh_id should already be setup as a :ref:`WorldScape3DMeshAsset` in the asset dock. This function extracts the instance transforms and colors from a multimesh and passes it to :ref:`add_transforms()`. + +Update will regenerate the MultiMeshInstances. Disable for bulk adding, then call at the end. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DInstancer_method_add_transforms: + +.. rst-class:: classref-method + +|void| **add_transforms**\ (\ mesh_id\: :ref:`int`, transforms\: :ref:`Array`\[:ref:`Transform3D`\], colors\: :ref:`PackedColorArray` = PackedColorArray(), update\: :ref:`bool` = true\ ) :ref:`🔗` + +Allows procedural placement of meshes. The mesh_id should already be setup as a :ref:`WorldScape3DMeshAsset` in the asset dock. You provide the array of Transform3Ds and optional Colors, which will be parsed into our data storage. + +This function adds the :ref:`WorldScape3DMeshAsset.height_offset` to the transform along its local Y axis. + +Update will regenerate the MultiMeshInstances. Disable for bulk adding, then call at the end. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DInstancer_method_append_location: + +.. rst-class:: classref-method + +|void| **append_location**\ (\ region_location\: :ref:`Vector2i`, mesh_id\: :ref:`int`, transforms\: :ref:`Array`\[:ref:`Transform3D`\], colors\: :ref:`PackedColorArray`, update\: :ref:`bool` = true\ ) :ref:`🔗` + +Appends new transforms to the existing data within a region location. The mesh_id should already be setup as a :ref:`WorldScape3DMeshAsset` in the asset dock. + +Update will regenerate the MultiMeshInstances. Disable for bulk adding, then call at the end. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DInstancer_method_append_region: + +.. rst-class:: classref-method + +|void| **append_region**\ (\ region\: :ref:`WorldScape3DRegion`, mesh_id\: :ref:`int`, transforms\: :ref:`Array`\[:ref:`Transform3D`\], colors\: :ref:`PackedColorArray`, update\: :ref:`bool` = true\ ) :ref:`🔗` + +Appends new transforms to the existing data within a region location. The mesh_id should already be setup as a :ref:`WorldScape3DMeshAsset` in the asset dock. + +Update will regenerate the MultiMeshInstances. Disable for bulk adding, then call at the end. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DInstancer_method_clear_by_location: + +.. rst-class:: classref-method + +|void| **clear_by_location**\ (\ region_location\: :ref:`Vector2i`, mesh_id\: :ref:`int`\ ) :ref:`🔗` + +Removes all instancer data and MultiMeshInstance nodes attached to the tree for the specified region location and mesh id. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DInstancer_method_clear_by_mesh: + +.. rst-class:: classref-method + +|void| **clear_by_mesh**\ (\ mesh_id\: :ref:`int`\ ) :ref:`🔗` + +Removes all instancer data and MultiMeshInstance nodes attached to the tree for all regions for the specified mesh id. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DInstancer_method_clear_by_region: + +.. rst-class:: classref-method + +|void| **clear_by_region**\ (\ region\: :ref:`WorldScape3DRegion`, mesh_id\: :ref:`int`\ ) :ref:`🔗` + +Removes all instancer data and MultiMeshInstance nodes attached to the tree for the specified region and mesh id. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DInstancer_method_dump_data: + +.. rst-class:: classref-method + +|void| **dump_data**\ (\ ) :ref:`🔗` + +Dumps the instancer data arrays and dictionaries for all regions. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DInstancer_method_dump_mmis: + +.. rst-class:: classref-method + +|void| **dump_mmis**\ (\ ) :ref:`🔗` + +Dumps the MultiMeshInstance3Ds attached to the tree and information about the nodes for all regions. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DInstancer_method_remove_instances: + +.. rst-class:: classref-method + +|void| **remove_instances**\ (\ global_position\: :ref:`Vector3`, params\: :ref:`Dictionary`\ ) :ref:`🔗` + +Uses parameters asset_id, size, strength, fixed_scale, random_scale, slope (Vector2), to randomly remove instances within the indicated brush position and size. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DInstancer_method_swap_ids: + +.. rst-class:: classref-method + +|void| **swap_ids**\ (\ src_id\: :ref:`int`, dest_id\: :ref:`int`\ ) :ref:`🔗` + +Swaps the ID of two meshes without changing the mesh instances on the ground. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DInstancer_method_update_mmis: + +.. rst-class:: classref-method + +|void| **update_mmis**\ (\ rebuild\: :ref:`bool` = false\ ) :ref:`🔗` + +Rebuilds the MMIs in cells that have been modified or are missing. See :ref:`WorldScape3DRegion.instances`. + +- rebuild - Destroys all MMIs first then rebuilds all of them from scratch. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DInstancer_method_update_transforms: + +.. rst-class:: classref-method + +|void| **update_transforms**\ (\ aabb\: :ref:`AABB`\ ) :ref:`🔗` + +Reviews all existing instance transforms within an AABB and adjusts their heights to match the terrain. + +.. |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.)` diff --git a/classes/class_worldscape3dmaterial.rst b/classes/class_worldscape3dmaterial.rst new file mode 100644 index 00000000000..036d1e9a231 --- /dev/null +++ b/classes/class_worldscape3dmaterial.rst @@ -0,0 +1,708 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Redot engine sources. +.. Generator: https://github.com/Redot-Engine/redot-engine/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/Redot-Engine/redot-engine/tree/master/modules/worldscape_3d/doc_classes/WorldScape3DMaterial.xml. + +.. _class_WorldScape3DMaterial: + +WorldScape3DMaterial +==================== + +**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` + +A custom shader material resource for WorldScape3D. + +.. rst-class:: classref-introduction-group + +Description +----------- + +This class handles options for both the built-in shader and any custom override shader. It collects compiled texture data from the other classes and sends all of it to the shader via the RenderingServer. + +It is a savable resource, so you can save it to disk and use the same material settings in multiple scenes that use WorldScape3D. The amount of data is small, assuming you have saved your shader parameter textures to disk, so it can be saved as a git-friendly, text based .tres file or left within the scene file. + +While it does mimic some of the functionality of ShaderMaterial, it does not derive from any of the Redot Material classes. It will not pass any ``is Material`` checks. It is a ``Resource``. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------+ + | :ref:`Dictionary` | :ref:`_shader_parameters` | ``{}`` | + +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`auto_shader_enabled` | ``false`` | + +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`dual_scaling_enabled` | ``false`` | + +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------+ + | :ref:`Shader` | :ref:`shader_override` | | + +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`shader_override_enabled` | ``false`` | + +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`show_autoshader` | ``false`` | + +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`show_checkered` | ``false`` | + +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`show_colormap` | ``false`` | + +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`show_contours` | ``false`` | + +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`show_control_angle` | ``false`` | + +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`show_control_blend` | ``false`` | + +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`show_control_scale` | ``false`` | + +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`show_control_texture` | ``false`` | + +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`show_grey` | ``false`` | + +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`show_heightmap` | ``false`` | + +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`show_instancer_grid` | ``false`` | + +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`show_jaggedness` | ``false`` | + +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`show_navigation` | ``false`` | + +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`show_region_grid` | ``false`` | + +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`show_roughmap` | ``false`` | + +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`show_texture_height` | ``false`` | + +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`show_texture_normal` | ``false`` | + +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`show_texture_rough` | ``false`` | + +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`show_vertex_grid` | ``false`` | + +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------+ + | :ref:`TextureFiltering` | :ref:`texture_filtering` | ``0`` | + +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------+ + | :ref:`WorldBackground` | :ref:`world_background` | ``1`` | + +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_material_rid`\ (\ ) |const| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_shader_param`\ (\ name\: :ref:`StringName`\ ) |const| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_shader_rid`\ (\ ) |const| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`save`\ (\ path\: :ref:`String` = ""\ ) | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_shader_param`\ (\ name\: :ref:`StringName`, value\: :ref:`Variant`\ ) | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`update`\ (\ ) | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Enumerations +------------ + +.. _enum_WorldScape3DMaterial_WorldBackground: + +.. rst-class:: classref-enumeration + +enum **WorldBackground**: :ref:`🔗` + +.. _class_WorldScape3DMaterial_constant_NONE: + +.. rst-class:: classref-enumeration-constant + +:ref:`WorldBackground` **NONE** = ``0`` + +Outside of the defined regions, hide the mesh. + +.. _class_WorldScape3DMaterial_constant_FLAT: + +.. rst-class:: classref-enumeration-constant + +:ref:`WorldBackground` **FLAT** = ``1`` + +Outside of the defined regions, show a flat terrain. + +.. _class_WorldScape3DMaterial_constant_NOISE: + +.. rst-class:: classref-enumeration-constant + +:ref:`WorldBackground` **NOISE** = ``2`` + +Outside of the defined regions, generate visual-only hills. + +.. rst-class:: classref-item-separator + +---- + +.. _enum_WorldScape3DMaterial_TextureFiltering: + +.. rst-class:: classref-enumeration + +enum **TextureFiltering**: :ref:`🔗` + +.. _class_WorldScape3DMaterial_constant_LINEAR: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureFiltering` **LINEAR** = ``0`` + +Textures are filtered using a blend of 4 adjacent pixels. Use this for most cases for high quality renders. + +.. _class_WorldScape3DMaterial_constant_NEAREST: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureFiltering` **NEAREST** = ``1`` + +Textures are filtered using a the nearest pixel only. It is faster than LINEAR, but the texture will look pixelated. Use this for a low-poly look, with a very low uv_scale. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_WorldScape3DMaterial_property__shader_parameters: + +.. rst-class:: classref-property + +:ref:`Dictionary` **_shader_parameters** = ``{}`` :ref:`🔗` + +This private dictionary stores all of the shader parameters in the resource. It is not a cache. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DMaterial_property_auto_shader_enabled: + +.. rst-class:: classref-property + +:ref:`bool` **auto_shader_enabled** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_auto_shader**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_auto_shader**\ (\ ) + +Enables selecting two texture IDs that will automatically be applied to the terrain based upon slope. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DMaterial_property_dual_scaling_enabled: + +.. rst-class:: classref-property + +:ref:`bool` **dual_scaling_enabled** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_dual_scaling**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_dual_scaling**\ (\ ) + +Enables selecting one texture ID that will have multiple scales applied based upon camera distance. Use it for something like a rock texture so up close it will be nicely detailed, and far away mountains can be covered in the same rock texture. The two blend together at a specified distance. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DMaterial_property_shader_override: + +.. rst-class:: classref-property + +:ref:`Shader` **shader_override** :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_shader_override**\ (\ value\: :ref:`Shader`\ ) +- :ref:`Shader` **get_shader_override**\ (\ ) + +If shader_override_enabled is true and this Shader is valid, the material will use this custom shader code. If this is blank when you enable the override, the system will generate a shader with the current settings. So if you have a debug view enabled, the generated shader will have all of that code. A visual shader will also work here. However we only generate a text based shader so currently a visual shader needs to be constructed with the base code before it can work. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DMaterial_property_shader_override_enabled: + +.. rst-class:: classref-property + +:ref:`bool` **shader_override_enabled** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **enable_shader_override**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_shader_override_enabled**\ (\ ) + +Enables use of the :ref:`shader_override` shader code. Generates default code if shader_override is blank. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DMaterial_property_show_autoshader: + +.. rst-class:: classref-property + +:ref:`bool` **show_autoshader** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_show_autoshader**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_show_autoshader**\ (\ ) + +Display the area designated for use by the autoshader, which shows materials based upon slope. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DMaterial_property_show_checkered: + +.. rst-class:: classref-property + +:ref:`bool` **show_checkered** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_show_checkered**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_show_checkered**\ (\ ) + +Shows a checkerboard display using a shader rendered pattern. This is turned on if the Texture List is empty. + +Note that when a blank texture slot is created, a 1k checkerboard texture is generated and stored in the texture slot. That takes VRAM. The two patterns have a slightly different scale. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DMaterial_property_show_colormap: + +.. rst-class:: classref-property + +:ref:`bool` **show_colormap** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_show_colormap**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_show_colormap**\ (\ ) + +Places the color map in the albedo channel. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DMaterial_property_show_contours: + +.. rst-class:: classref-property + +:ref:`bool` **show_contours** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_show_contours**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_show_contours**\ (\ ) + +Overlays contour lines on the terrain. Customize the options in the material when enabled. Press `4` with the mouse in the viewport to toggle. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DMaterial_property_show_control_angle: + +.. rst-class:: classref-property + +:ref:`bool` **show_control_angle** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_show_control_angle**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_show_control_angle**\ (\ ) + +Albedo shows the painted angle. Orange means 0°, Yellow 270°, Cyan 180°, Violet 90°. Or warm colors towards -Z, cool colors +Z, greens/yellows +X, reds/blues -X. Draw all angles coming from the center of a circle for a better understanding. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DMaterial_property_show_control_blend: + +.. rst-class:: classref-property + +:ref:`bool` **show_control_blend** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_show_control_blend**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_show_control_blend**\ (\ ) + +Displays the values used to blend the textures. Blue shows the autoshader blending, red shows manually painted blending. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DMaterial_property_show_control_scale: + +.. rst-class:: classref-property + +:ref:`bool` **show_control_scale** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_show_control_scale**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_show_control_scale**\ (\ ) + +Albedo shows the painted scale. Larger scales are more red, smaller scales are more blue. 0.5 middle gray is the default 100% scale. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DMaterial_property_show_control_texture: + +.. rst-class:: classref-property + +:ref:`bool` **show_control_texture** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_show_control_texture**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_show_control_texture**\ (\ ) + +Albedo shows the base and overlay texture indices defined by the control map. Red pixels indicate the base texture, with brightness showing texture ids 0 to 31. Green pixels indicate the overlay texture. Yellow indicates both. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DMaterial_property_show_grey: + +.. rst-class:: classref-property + +:ref:`bool` **show_grey** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_show_grey**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_show_grey**\ (\ ) + +Albedo is set to 0.2 gray. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DMaterial_property_show_heightmap: + +.. rst-class:: classref-property + +:ref:`bool` **show_heightmap** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_show_heightmap**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_show_heightmap**\ (\ ) + +Albedo is a white to black gradient depending on height. The gradient is scaled to a height of 300, so above that or far below 0 will be all white or black. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DMaterial_property_show_instancer_grid: + +.. rst-class:: classref-property + +:ref:`bool` **show_instancer_grid** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_show_instancer_grid**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_show_instancer_grid**\ (\ ) + +Overlays the 32x32m instancer grid on the terrain, which shows how the instancer data is partitioned. Press `2` with the mouse in the viewport to toggle. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DMaterial_property_show_jaggedness: + +.. rst-class:: classref-property + +:ref:`bool` **show_jaggedness** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_show_jaggedness**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_show_jaggedness**\ (\ ) + +Highlights non-smooth areas of the terrain. Jagged peaks, troughs, or edges that are a bit rough with sharp angles between vertices. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DMaterial_property_show_navigation: + +.. rst-class:: classref-property + +:ref:`bool` **show_navigation** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_show_navigation**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_show_navigation**\ (\ ) + +Displays the area designated for generating the navigation mesh. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DMaterial_property_show_region_grid: + +.. rst-class:: classref-property + +:ref:`bool` **show_region_grid** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_show_region_grid**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_show_region_grid**\ (\ ) + +Overlays the region grid on the terrain. This is more accurate than the region grid gizmo for determining where the region border is when editing. Press `1` with the mouse in the viewport to toggle. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DMaterial_property_show_roughmap: + +.. rst-class:: classref-property + +:ref:`bool` **show_roughmap** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_show_roughmap**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_show_roughmap**\ (\ ) + +Albedo is set to the roughness modification map as gray scale. Middle gray, 0.5 means no roughness modification. Black would be high gloss while white is very rough. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DMaterial_property_show_texture_height: + +.. rst-class:: classref-property + +:ref:`bool` **show_texture_height** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_show_texture_height**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_show_texture_height**\ (\ ) + +Albedo is set to the painted Height textures. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DMaterial_property_show_texture_normal: + +.. rst-class:: classref-property + +:ref:`bool` **show_texture_normal** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_show_texture_normal**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_show_texture_normal**\ (\ ) + +Albedo is set to the painted Normal textures. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DMaterial_property_show_texture_rough: + +.. rst-class:: classref-property + +:ref:`bool` **show_texture_rough** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_show_texture_rough**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_show_texture_rough**\ (\ ) + +Albedo is set to the painted Roughness textures. This is different from the roughness modification map above. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DMaterial_property_show_vertex_grid: + +.. rst-class:: classref-property + +:ref:`bool` **show_vertex_grid** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_show_vertex_grid**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_show_vertex_grid**\ (\ ) + +Overlays the vertex grid on the terrain, showing where each vertex is. Press `3` with the mouse in the viewport to toggle. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DMaterial_property_texture_filtering: + +.. rst-class:: classref-property + +:ref:`TextureFiltering` **texture_filtering** = ``0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_texture_filtering**\ (\ value\: :ref:`TextureFiltering`\ ) +- :ref:`TextureFiltering` **get_texture_filtering**\ (\ ) + +Sets how the renderer should filter textures. See :ref:`TextureFiltering` for options. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DMaterial_property_world_background: + +.. rst-class:: classref-property + +:ref:`WorldBackground` **world_background** = ``1`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_world_background**\ (\ value\: :ref:`WorldBackground`\ ) +- :ref:`WorldBackground` **get_world_background**\ (\ ) + +Sets how the mesh outside of defined regions behave. See :ref:`WorldBackground` for options. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_WorldScape3DMaterial_method_get_material_rid: + +.. rst-class:: classref-method + +:ref:`RID` **get_material_rid**\ (\ ) |const| :ref:`🔗` + +Returns the RID of the material used with the Rendering Server. This is set per instance of this class. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DMaterial_method_get_shader_param: + +.. rst-class:: classref-method + +:ref:`Variant` **get_shader_param**\ (\ name\: :ref:`StringName`\ ) |const| :ref:`🔗` + +Retrieve a parameter from the active shader (built-in or override shader). + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DMaterial_method_get_shader_rid: + +.. rst-class:: classref-method + +:ref:`RID` **get_shader_rid**\ (\ ) |const| :ref:`🔗` + +Returns the RID of the built in shader used with the Rendering Server. This is different from any shader override which has its own RID. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DMaterial_method_save: + +.. rst-class:: classref-method + +:ref:`Error` **save**\ (\ path\: :ref:`String` = ""\ ) :ref:`🔗` + +Saves this material resource to disk, if saved as an external ``.tres`` or ``.res`` resource file. + +path - specifies a directory and file name to use from now on. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DMaterial_method_set_shader_param: + +.. rst-class:: classref-method + +|void| **set_shader_param**\ (\ name\: :ref:`StringName`, value\: :ref:`Variant`\ ) :ref:`🔗` + +Set a parameter in the active shader (built-in or override shader). + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DMaterial_method_update: + +.. rst-class:: classref-method + +|void| **update**\ (\ ) :ref:`🔗` + +Recompiles the current shader and sends all uniform values to it again. + +.. |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.)` diff --git a/classes/class_worldscape3dmeshasset.rst b/classes/class_worldscape3dmeshasset.rst new file mode 100644 index 00000000000..99165584d34 --- /dev/null +++ b/classes/class_worldscape3dmeshasset.rst @@ -0,0 +1,756 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Redot engine sources. +.. Generator: https://github.com/Redot-Engine/redot-engine/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/Redot-Engine/redot-engine/tree/master/modules/worldscape_3d/doc_classes/WorldScape3DMeshAsset.xml. + +.. _class_WorldScape3DMeshAsset: + +WorldScape3DMeshAsset +===================== + +**Inherits:** :ref:`WorldScape3DAssetResource` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` + +.. rst-class:: classref-introduction-group + +Description +----------- + +This class manages meshes used for instancing. There are two broad types of meshes it can host. + +1. Generated Texture Card - this class will generate a QuadMesh. The typical use for this is to create a material in the override material, place a 2D grass texture in the `albedo texture` slot, and enable alpha scissor. This will generate low poly grass. + +2. Scene File - you can provide your own mesh in a scene file, which is specifically a PackedScene (.tscn, .scn, .glb, .fbx, etc). You can override the material if desired. MultiMeshes only support one mesh object, so complex objects like tree trunks and leaves, or a door frame and door either need to be combined into one object with multiple materials, or placed by another method. The system will look for MeshInstance3D nodes in the file to use as Levels of Detail (LODs). Ideally they have suffixes like `LOD0`, `LOD1`. We support up to 10 LODs, but recommend no more than 4. + +\ **Read More:** `MultiMesh `__, `MultiMeshInstance3D `__ + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +---------------------------------------------------------------------------+----------------------------------------------------------------------------------+-------------------+ + | :ref:`ShadowCastingSetting` | :ref:`cast_shadows` | ``1`` | + +---------------------------------------------------------------------------+----------------------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`density` | ``10.0`` | + +---------------------------------------------------------------------------+----------------------------------------------------------------------------------+-------------------+ + | :ref:`bool` | :ref:`enabled` | ``true`` | + +---------------------------------------------------------------------------+----------------------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`fade_margin` | ``0.0`` | + +---------------------------------------------------------------------------+----------------------------------------------------------------------------------+-------------------+ + | :ref:`int` | :ref:`generated_faces` | ``2`` | + +---------------------------------------------------------------------------+----------------------------------------------------------------------------------+-------------------+ + | :ref:`Vector2` | :ref:`generated_size` | ``Vector2(1, 1)`` | + +---------------------------------------------------------------------------+----------------------------------------------------------------------------------+-------------------+ + | :ref:`GenType` | :ref:`generated_type` | ``0`` | + +---------------------------------------------------------------------------+----------------------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`height_offset` | ``0.0`` | + +---------------------------------------------------------------------------+----------------------------------------------------------------------------------+-------------------+ + | :ref:`int` | :ref:`id` | ``0`` | + +---------------------------------------------------------------------------+----------------------------------------------------------------------------------+-------------------+ + | :ref:`int` | :ref:`last_lod` | ``9`` | + +---------------------------------------------------------------------------+----------------------------------------------------------------------------------+-------------------+ + | :ref:`int` | :ref:`last_shadow_lod` | ``9`` | + +---------------------------------------------------------------------------+----------------------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`lod0_range` | ``32.0`` | + +---------------------------------------------------------------------------+----------------------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`lod1_range` | ``64.0`` | + +---------------------------------------------------------------------------+----------------------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`lod2_range` | ``96.0`` | + +---------------------------------------------------------------------------+----------------------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`lod3_range` | ``128.0`` | + +---------------------------------------------------------------------------+----------------------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`lod4_range` | ``160.0`` | + +---------------------------------------------------------------------------+----------------------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`lod5_range` | ``192.0`` | + +---------------------------------------------------------------------------+----------------------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`lod6_range` | ``224.0`` | + +---------------------------------------------------------------------------+----------------------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`lod7_range` | ``256.0`` | + +---------------------------------------------------------------------------+----------------------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`lod8_range` | ``288.0`` | + +---------------------------------------------------------------------------+----------------------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`lod9_range` | ``320.0`` | + +---------------------------------------------------------------------------+----------------------------------------------------------------------------------+-------------------+ + | :ref:`int` | :ref:`lod_count` | ``0`` | + +---------------------------------------------------------------------------+----------------------------------------------------------------------------------+-------------------+ + | :ref:`Material` | :ref:`material_overlay` | | + +---------------------------------------------------------------------------+----------------------------------------------------------------------------------+-------------------+ + | :ref:`Material` | :ref:`material_override` | | + +---------------------------------------------------------------------------+----------------------------------------------------------------------------------+-------------------+ + | :ref:`String` | :ref:`name` | ``""`` | + +---------------------------------------------------------------------------+----------------------------------------------------------------------------------+-------------------+ + | :ref:`PackedScene` | :ref:`scene_file` | | + +---------------------------------------------------------------------------+----------------------------------------------------------------------------------+-------------------+ + | :ref:`int` | :ref:`shadow_impostor` | ``0`` | + +---------------------------------------------------------------------------+----------------------------------------------------------------------------------+-------------------+ + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear`\ (\ ) | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_lod_range`\ (\ lod\: :ref:`int`\ ) |const| | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Mesh` | :ref:`get_mesh`\ (\ lod\: :ref:`int` = 0\ ) |const| | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`get_thumbnail`\ (\ ) |const| | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_lod_range`\ (\ lod\: :ref:`int`, distance\: :ref:`float`\ ) | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Signals +------- + +.. _class_WorldScape3DMeshAsset_signal_file_changed: + +.. rst-class:: classref-signal + +**file_changed**\ (\ ) :ref:`🔗` + +Emitted when :ref:`scene_file` is changed, or if the generated mesh is toggled. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DMeshAsset_signal_id_changed: + +.. rst-class:: classref-signal + +**id_changed**\ (\ type\: :ref:`int`, old_id\: :ref:`int`, new_id\: :ref:`int`\ ) :ref:`🔗` + +Emitted when :ref:`id` is changed. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DMeshAsset_signal_instancer_setting_changed: + +.. rst-class:: classref-signal + +**instancer_setting_changed**\ (\ ) :ref:`🔗` + +Emitted when instancer specific settings are changed on this mesh asset, such as :ref:`cast_shadows`, and triggers an instancer rebuild. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DMeshAsset_signal_setting_changed: + +.. rst-class:: classref-signal + +**setting_changed**\ (\ ) :ref:`🔗` + +Emitted when settings are changed, other than those tracked by other signals. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Enumerations +------------ + +.. _enum_WorldScape3DMeshAsset_GenType: + +.. rst-class:: classref-enumeration + +enum **GenType**: :ref:`🔗` + +.. _class_WorldScape3DMeshAsset_constant_TYPE_NONE: + +.. rst-class:: classref-enumeration-constant + +:ref:`GenType` **TYPE_NONE** = ``0`` + +No generated mesh is in use, likely because a scene file is used. + +.. _class_WorldScape3DMeshAsset_constant_TYPE_TEXTURE_CARD: + +.. rst-class:: classref-enumeration-constant + +:ref:`GenType` **TYPE_TEXTURE_CARD** = ``1`` + +Generates a QuadMesh to be used as a texture card. + +.. _class_WorldScape3DMeshAsset_constant_TYPE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`GenType` **TYPE_MAX** = ``2`` + +Maximum value for this enum. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_WorldScape3DMeshAsset_property_cast_shadows: + +.. rst-class:: classref-property + +:ref:`ShadowCastingSetting` **cast_shadows** = ``1`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_cast_shadows**\ (\ value\: :ref:`ShadowCastingSetting`\ ) +- :ref:`ShadowCastingSetting` **get_cast_shadows**\ (\ ) + +Tells the renderer how to cast shadows from this mesh asset onto the terrain and other objects. This sets ``GeometryInstance3D.cast_shadow`` on all MultiMeshInstances used by this mesh. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DMeshAsset_property_density: + +.. rst-class:: classref-property + +:ref:`float` **density** = ``10.0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_density**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_density**\ (\ ) + +Density is used to set the approximate default spacing between instances based on the size of the mesh. When painting meshes on the terrain, mesh density is multiplied by brush strength. + +This value is not tied to any real world unit. It is calculated as ``10.f / mesh->get_aabb().get_volume()``, then clamped to a sane range. If the calculated amount is inappropriate, increase or decrease it here. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DMeshAsset_property_enabled: + +.. rst-class:: classref-property + +:ref:`bool` **enabled** = ``true`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_enabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_enabled**\ (\ ) + +If enabled, MultiMeshInstance3Ds will be generated for this mesh asset. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DMeshAsset_property_fade_margin: + +.. rst-class:: classref-property + +:ref:`float` **fade_margin** = ``0.0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_fade_margin**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_fade_margin**\ (\ ) + +If > 0, sets ``GeometryInstance3D.fade_mode = self``, sets this margin in ``GeometryInstance3D.visibility_range_begin_margin`` and ``GeometryInstance3D.visibility_range_end_margin`` and adjusts the ranges to allow fading between lods. + +Limited to the smaller of half the distance between LOD0 and LOD1, or 64m. + +Currently broken and hidden in the inspector until `Redot issue #102799 `__ is fixed. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DMeshAsset_property_generated_faces: + +.. rst-class:: classref-property + +:ref:`int` **generated_faces** = ``2`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_generated_faces**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_generated_faces**\ (\ ) + +Select if you want the generated texture card to have a single QuadMesh, 2 meshes rotated 90° in a cross, or 3 rotated at 60°. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DMeshAsset_property_generated_size: + +.. rst-class:: classref-property + +:ref:`Vector2` **generated_size** = ``Vector2(1, 1)`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_generated_size**\ (\ value\: :ref:`Vector2`\ ) +- :ref:`Vector2` **get_generated_size**\ (\ ) + +Sets the base size of the QuadMesh texture card. Increasing this size will expand from bottom, not the middle. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DMeshAsset_property_generated_type: + +.. rst-class:: classref-property + +:ref:`GenType` **generated_type** = ``0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_generated_type**\ (\ value\: :ref:`GenType`\ ) +- :ref:`GenType` **get_generated_type**\ (\ ) + +If enabled, this mesh asset will be set to a generated QuadMesh to be used as a texture card. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DMeshAsset_property_height_offset: + +.. rst-class:: classref-property + +:ref:`float` **height_offset** = ``0.0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_height_offset**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_height_offset**\ (\ ) + +Vertically offsets the origin point of the mesh asset. For example, if you have a 2 meter diameter rock with the mesh origin point in the center, but you want all rocks to be sitting on the ground, you could enter 1 or 0.9 here and it will be placed near its edge. You can also adjust this when painting using the tool settings bar; both options are cumulative. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DMeshAsset_property_id: + +.. rst-class:: classref-property + +:ref:`int` **id** = ``0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_id**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_id**\ (\ ) + +The user settable ID of the mesh. You can change this to reorder meshes in the list. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DMeshAsset_property_last_lod: + +.. rst-class:: classref-property + +:ref:`int` **last_lod** = ``9`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_last_lod**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_last_lod**\ (\ ) + +Sets the farthest Level of Detail (LOD) that will be rendered. Farther LODs (greater than this number) will be ignored. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DMeshAsset_property_last_shadow_lod: + +.. rst-class:: classref-property + +:ref:`int` **last_shadow_lod** = ``9`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_last_shadow_lod**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_last_shadow_lod**\ (\ ) + +Sets the farthest Level of Detail (LOD) that will cast shadows. Farther LODs (greater than this number) won't cast shadows. If :ref:`shadow_impostor` is greater than this number, the shadow impostor will still cast shadows. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DMeshAsset_property_lod0_range: + +.. rst-class:: classref-property + +:ref:`float` **lod0_range** = ``32.0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_lod0_range**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_lod0_range**\ (\ ) + +Sets ``GeometryInstance3D.visibility_range_end`` on all MultiMeshInstances used by this mesh at the closest Level of Detail (LOD), the most detailed. + +Allows the renderer to cull MMIs beyond this distance. The next LOD level will use this value for its ``GeometryInstance3D.visibility_range_begin``. + +Set to 0 to disable culling and see this LOD at any distance. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DMeshAsset_property_lod1_range: + +.. rst-class:: classref-property + +:ref:`float` **lod1_range** = ``64.0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_lod1_range**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_lod1_range**\ (\ ) + +Sets the end visible range for LOD1. See :ref:`lod0_range`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DMeshAsset_property_lod2_range: + +.. rst-class:: classref-property + +:ref:`float` **lod2_range** = ``96.0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_lod2_range**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_lod2_range**\ (\ ) + +Sets the end visible range for LOD2. See :ref:`lod0_range`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DMeshAsset_property_lod3_range: + +.. rst-class:: classref-property + +:ref:`float` **lod3_range** = ``128.0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_lod3_range**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_lod3_range**\ (\ ) + +Sets the end visible range for LOD3. See :ref:`lod0_range`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DMeshAsset_property_lod4_range: + +.. rst-class:: classref-property + +:ref:`float` **lod4_range** = ``160.0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_lod4_range**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_lod4_range**\ (\ ) + +Sets the end visible range for LOD4. See :ref:`lod0_range`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DMeshAsset_property_lod5_range: + +.. rst-class:: classref-property + +:ref:`float` **lod5_range** = ``192.0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_lod5_range**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_lod5_range**\ (\ ) + +Sets the end visible range for LOD5. See :ref:`lod0_range`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DMeshAsset_property_lod6_range: + +.. rst-class:: classref-property + +:ref:`float` **lod6_range** = ``224.0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_lod6_range**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_lod6_range**\ (\ ) + +Sets the end visible range for LOD6. See :ref:`lod0_range`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DMeshAsset_property_lod7_range: + +.. rst-class:: classref-property + +:ref:`float` **lod7_range** = ``256.0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_lod7_range**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_lod7_range**\ (\ ) + +Sets the end visible range for LOD7. See :ref:`lod0_range`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DMeshAsset_property_lod8_range: + +.. rst-class:: classref-property + +:ref:`float` **lod8_range** = ``288.0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_lod8_range**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_lod8_range**\ (\ ) + +Sets the end visible range for LOD8. See :ref:`lod0_range`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DMeshAsset_property_lod9_range: + +.. rst-class:: classref-property + +:ref:`float` **lod9_range** = ``320.0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_lod9_range**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_lod9_range**\ (\ ) + +Sets the end visible range for LOD9. See :ref:`lod0_range`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DMeshAsset_property_lod_count: + +.. rst-class:: classref-property + +:ref:`int` **lod_count** = ``0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- :ref:`int` **get_lod_count**\ (\ ) + +Provides the detected number of Levels of Detail (LODs) found in the provided scene file or generated mesh. Read only. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DMeshAsset_property_material_overlay: + +.. rst-class:: classref-property + +:ref:`Material` **material_overlay** :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_material_overlay**\ (\ value\: :ref:`Material`\ ) +- :ref:`Material` **get_material_overlay**\ (\ ) + +This sets ``GeometryInstance3D.material_overlay``, which applies an overriding material using ``next_pass`` that overlays the base material. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DMeshAsset_property_material_override: + +.. rst-class:: classref-property + +:ref:`Material` **material_override** :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_material_override**\ (\ value\: :ref:`Material`\ ) +- :ref:`Material` **get_material_override**\ (\ ) + +This sets ``GeometryInstance3D.material_override``, which replaces the rendered mesh material with this one. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DMeshAsset_property_name: + +.. rst-class:: classref-property + +:ref:`String` **name** = ``""`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_name**\ (\ value\: :ref:`String`\ ) +- :ref:`String` **get_name**\ (\ ) + +The user specified name for this asset. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DMeshAsset_property_scene_file: + +.. rst-class:: classref-property + +:ref:`PackedScene` **scene_file** :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_scene_file**\ (\ value\: :ref:`PackedScene`\ ) +- :ref:`PackedScene` **get_scene_file**\ (\ ) + +Specifies the PackedScene (.tscn, .scn, .glb, .fbx, etc) to load the mesh from. See the top description. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DMeshAsset_property_shadow_impostor: + +.. rst-class:: classref-property + +:ref:`int` **shadow_impostor** = ``0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_shadow_impostor**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_shadow_impostor**\ (\ ) + +Uses this lower quality Level of Detail (LOD) to calculate shadows (as an impostor) instead of the visible mesh. + +e.g. Normally each LOD casts its own shadows. Given LOD0-3, if ``shadow_impostor = 2`` then when LOD0-1 are visible, they are set to no shadows and LOD2 is set to cast shadows only. When LOD2-3 are visible, each casts their own shadow as normal. + +Increase to improve performance by lowering shadow quality. + +Shadow impostors are disabled if this is set to 0 or if :ref:`cast_shadows` is set to shadows only. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_WorldScape3DMeshAsset_method_clear: + +.. rst-class:: classref-method + +|void| **clear**\ (\ ) :ref:`🔗` + +Resets this resource to default settings. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DMeshAsset_method_get_lod_range: + +.. rst-class:: classref-method + +:ref:`float` **get_lod_range**\ (\ lod\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the far visible distance for the specified Level of Detail (LOD). The near visible distance is the LOD range for the next closest LOD. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DMeshAsset_method_get_mesh: + +.. rst-class:: classref-method + +:ref:`Mesh` **get_mesh**\ (\ lod\: :ref:`int` = 0\ ) |const| :ref:`🔗` + +Returns the ``Mesh`` resource for the specified Level of Detail (LOD). + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DMeshAsset_method_get_thumbnail: + +.. rst-class:: classref-method + +:ref:`Texture2D` **get_thumbnail**\ (\ ) |const| :ref:`🔗` + +Returns the thumbnail generated by :ref:`WorldScape3DAssets`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DMeshAsset_method_set_lod_range: + +.. rst-class:: classref-method + +|void| **set_lod_range**\ (\ lod\: :ref:`int`, distance\: :ref:`float`\ ) :ref:`🔗` + +Sets the far visible distance for the specified Level of Detail (LOD). + +.. |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.)` diff --git a/classes/class_worldscape3dregion.rst b/classes/class_worldscape3dregion.rst new file mode 100644 index 00000000000..1efca7c68dc --- /dev/null +++ b/classes/class_worldscape3dregion.rst @@ -0,0 +1,553 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Redot engine sources. +.. Generator: https://github.com/Redot-Engine/redot-engine/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/Redot-Engine/redot-engine/tree/master/modules/worldscape_3d/doc_classes/WorldScape3DRegion.xml. + +.. _class_WorldScape3DRegion: + +WorldScape3DRegion +================== + +**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` + +.. rst-class:: classref-introduction-group + +Description +----------- + +This resource stores all map data for WorldScape3D. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-------------------------------------+-------------------------------------------------------------------------+-------------------+ + | :ref:`Image` | :ref:`color_map` | | + +-------------------------------------+-------------------------------------------------------------------------+-------------------+ + | :ref:`Image` | :ref:`control_map` | | + +-------------------------------------+-------------------------------------------------------------------------+-------------------+ + | :ref:`bool` | :ref:`deleted` | | + +-------------------------------------+-------------------------------------------------------------------------+-------------------+ + | :ref:`bool` | :ref:`edited` | | + +-------------------------------------+-------------------------------------------------------------------------+-------------------+ + | :ref:`Image` | :ref:`height_map` | | + +-------------------------------------+-------------------------------------------------------------------------+-------------------+ + | :ref:`Vector2` | :ref:`height_range` | ``Vector2(0, 0)`` | + +-------------------------------------+-------------------------------------------------------------------------+-------------------+ + | :ref:`Dictionary` | :ref:`instances` | ``{}`` | + +-------------------------------------+-------------------------------------------------------------------------+-------------------+ + | :ref:`Vector2i` | :ref:`location` | | + +-------------------------------------+-------------------------------------------------------------------------+-------------------+ + | :ref:`bool` | :ref:`modified` | | + +-------------------------------------+-------------------------------------------------------------------------+-------------------+ + | :ref:`int` | :ref:`region_size` | ``0`` | + +-------------------------------------+-------------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`version` | ``0.8`` | + +-------------------------------------+-------------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`vertex_spacing` | ``1.0`` | + +-------------------------------------+-------------------------------------------------------------------------+-------------------+ + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`calc_height_range`\ (\ ) | + +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`get_data`\ (\ ) |const| | + +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Image` | :ref:`get_map`\ (\ map_type\: :ref:`MapType`\ ) |const| | + +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`Image`\] | :ref:`get_maps`\ (\ ) |const| | + +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Image` | :ref:`sanitize_map`\ (\ map_type\: :ref:`MapType`, map\: :ref:`Image`\ ) |const| | + +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`sanitize_maps`\ (\ ) | + +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`save`\ (\ path\: :ref:`String` = "", save_16_bit\: :ref:`bool` = false\ ) | + +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_data`\ (\ data\: :ref:`Dictionary`\ ) | + +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_map`\ (\ map_type\: :ref:`MapType`, map\: :ref:`Image`\ ) | + +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_maps`\ (\ maps\: :ref:`Array`\[:ref:`Image`\]\ ) | + +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`update_height`\ (\ height\: :ref:`float`\ ) | + +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`update_heights`\ (\ low_high\: :ref:`Vector2`\ ) | + +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`validate_map_size`\ (\ map\: :ref:`Image`\ ) |const| | + +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Enumerations +------------ + +.. _enum_WorldScape3DRegion_MapType: + +.. rst-class:: classref-enumeration + +enum **MapType**: :ref:`🔗` + +.. _class_WorldScape3DRegion_constant_TYPE_HEIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`MapType` **TYPE_HEIGHT** = ``0`` + +Height map - real values, eg. 10m, 44.5m. + +.. _class_WorldScape3DRegion_constant_TYPE_CONTROL: + +.. rst-class:: classref-enumeration-constant + +:ref:`MapType` **TYPE_CONTROL** = ``1`` + +Control map - defines where textures and holes are placed. + +.. _class_WorldScape3DRegion_constant_TYPE_COLOR: + +.. rst-class:: classref-enumeration-constant + +:ref:`MapType` **TYPE_COLOR** = ``2`` + +Color map - paints color on the terrain + +.. _class_WorldScape3DRegion_constant_TYPE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`MapType` **TYPE_MAX** = ``3`` + +The number of elements in this enum. Often used to specify all map types for functions that request one. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_WorldScape3DRegion_property_color_map: + +.. rst-class:: classref-property + +:ref:`Image` **color_map** :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_color_map**\ (\ value\: :ref:`Image`\ ) +- :ref:`Image` **get_color_map**\ (\ ) + +This map is used to paint color that blends in to the terrain textures. + +Image format: FORMAT_RGBA8, 32-bits per pixel as four 8-bit components. + +\ **RGB** is used for color, which is multiplied by albedo in the shader. Multiply is a blend mode that only darkens. + +\ **A** is used for a roughness modifier. A value of 0.5 means no change to the existing texture roughness. Higher than this value increases roughness, lower decreases it. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DRegion_property_control_map: + +.. rst-class:: classref-property + +:ref:`Image` **control_map** :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_control_map**\ (\ value\: :ref:`Image`\ ) +- :ref:`Image` **get_control_map**\ (\ ) + +This map tells the shader which textures to use where, how to blend, where to place holes, etc. + +Image format: FORMAT_RF, 32-bit per pixel as full-precision floating-point. + +However, we interpret these images as format: `RenderingDevice.DATA_FORMAT_R32_UINT `__ aka OpenGL RG32UI 32-bit per pixel as unsigned integer. See `Control map format `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DRegion_property_deleted: + +.. rst-class:: classref-property + +:ref:`bool` **deleted** :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_deleted**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_deleted**\ (\ ) + +This region is marked for deletion. It won't be rendered once :ref:`WorldScape3DData.update_maps()` rebuilds the map index. The file will be deleted from disk on :ref:`save()`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DRegion_property_edited: + +.. rst-class:: classref-property + +:ref:`bool` **edited** :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_edited**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_edited**\ (\ ) + +This region is marked for updating by :ref:`WorldScape3DData.update_maps()` and for undo/redo tracking while the terrain is being edited. This flag serves a different purpose than :ref:`modified`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DRegion_property_height_map: + +.. rst-class:: classref-property + +:ref:`Image` **height_map** :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_height_map**\ (\ value\: :ref:`Image`\ ) +- :ref:`Image` **get_height_map**\ (\ ) + +This map contains the real value heights for the terrain. + +Image format: FORMAT_RF, 32-bit per pixel as full-precision floating-point. + +Heights sent to the vertex shader on the GPU which modifies the mesh in real-time. + +Editing is always done in 32-bit. We do provide an option to save as 16-bit, see :ref:`WorldScape3D.save_16_bit`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DRegion_property_height_range: + +.. rst-class:: classref-property + +:ref:`Vector2` **height_range** = ``Vector2(0, 0)`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_height_range**\ (\ value\: :ref:`Vector2`\ ) +- :ref:`Vector2` **get_height_range**\ (\ ) + +The current minimum and maximum height range for this region, used to calculate the AABB of the terrain. Update it with :ref:`update_height()`, and recalculate it with :ref:`calc_height_range()`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DRegion_property_instances: + +.. rst-class:: classref-property + +:ref:`Dictionary` **instances** = ``{}`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_instances**\ (\ value\: :ref:`Dictionary`\ ) +- :ref:`Dictionary` **get_instances**\ (\ ) + +A Dictionary that stores the instancer transforms for this region. + +The format is instances{mesh_id:int} -> cells{grid_location:Vector2i} -> ( Array:Transform3D, PackedColorArray, modified:bool ). That is: + +- A Dictionary keyed by mesh_id that returns: + +- A Dictionary keyed by the grid location of the 32 x 32m cell that returns: + +- A 3-item Array that contains: + +- 0: An Array of Transform3Ds + +- 1: A PackedColorArray with instance colors, same index as above + +- 2: A bool that tracks if this cell has been modified + +After changing this data, call :ref:`WorldScape3DInstancer.update_mmis()` to rebuild the MMIs. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DRegion_property_location: + +.. rst-class:: classref-property + +:ref:`Vector2i` **location** :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_location**\ (\ value\: :ref:`Vector2i`\ ) +- :ref:`Vector2i` **get_location**\ (\ ) + +The location in region grid space ``(world space / region_size)`` coordinates. e.g. (-1, 1) equates to (-1024, 1024) in world space given a :ref:`region_size` of 1024. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DRegion_property_modified: + +.. rst-class:: classref-property + +:ref:`bool` **modified** :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_modified**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_modified**\ (\ ) + +This region has been modified and will be saved to disk upon :ref:`save()`. This serves a different purpose than the temporary :ref:`edited` setting. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DRegion_property_region_size: + +.. rst-class:: classref-property + +:ref:`int` **region_size** = ``0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_region_size**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_region_size**\ (\ ) + +The current region size for this region, calculated from the dimensions of the first loaded map. It should match :ref:`WorldScape3D.region_size`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DRegion_property_version: + +.. rst-class:: classref-property + +:ref:`float` **version** = ``0.8`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_version**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_version**\ (\ ) + +The data file version. This is independent of the WorldScape3D version, though they often align. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DRegion_property_vertex_spacing: + +.. rst-class:: classref-property + +:ref:`float` **vertex_spacing** = ``1.0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_vertex_spacing**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_vertex_spacing**\ (\ ) + +Stored instancer transforms are laterally scaled by this value. This value is manage by the instancer on loading or when :ref:`WorldScape3D.vertex_spacing` is set, and shouldn't be manually adjusted. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_WorldScape3DRegion_method_calc_height_range: + +.. rst-class:: classref-method + +|void| **calc_height_range**\ (\ ) :ref:`🔗` + +Recalculates the height range for this region by looking at every pixel in the heightmap. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DRegion_method_get_data: + +.. rst-class:: classref-method + +:ref:`Dictionary` **get_data**\ (\ ) |const| :ref:`🔗` + +Returns all data in this region in a dictionary. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DRegion_method_get_map: + +.. rst-class:: classref-method + +:ref:`Image` **get_map**\ (\ map_type\: :ref:`MapType`\ ) |const| :ref:`🔗` + +Returns the specified image map. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DRegion_method_get_maps: + +.. rst-class:: classref-method + +:ref:`Array`\[:ref:`Image`\] **get_maps**\ (\ ) |const| :ref:`🔗` + +Returns an Array\ :ref:`Image` with height, control, and color maps. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DRegion_method_sanitize_map: + +.. rst-class:: classref-method + +:ref:`Image` **sanitize_map**\ (\ map_type\: :ref:`MapType`, map\: :ref:`Image`\ ) |const| :ref:`🔗` + +Validates and adjusts the map size and format if possible, or creates a usable blank image in the right size and format. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DRegion_method_sanitize_maps: + +.. rst-class:: classref-method + +|void| **sanitize_maps**\ (\ ) :ref:`🔗` + +Sanitizes all map types. See :ref:`sanitize_map()`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DRegion_method_save: + +.. rst-class:: classref-method + +:ref:`Error` **save**\ (\ path\: :ref:`String` = "", save_16_bit\: :ref:`bool` = false\ ) :ref:`🔗` + +Saves this region to the current file name. + +- path - specifies a directory and file name to use from now on. + +- 16-bit - save this region with 16-bit height map instead of 32-bit. This process is lossy. Does not change the bit depth in memory. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DRegion_method_set_data: + +.. rst-class:: classref-method + +|void| **set_data**\ (\ data\: :ref:`Dictionary`\ ) :ref:`🔗` + +Overwrites all local variables with values in the dictionary. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DRegion_method_set_map: + +.. rst-class:: classref-method + +|void| **set_map**\ (\ map_type\: :ref:`MapType`, map\: :ref:`Image`\ ) :ref:`🔗` + +Assigns the provided map to the desired map type. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DRegion_method_set_maps: + +.. rst-class:: classref-method + +|void| **set_maps**\ (\ maps\: :ref:`Array`\[:ref:`Image`\]\ ) :ref:`🔗` + +Expects an array with three images in it, and assigns them to the height, control, and color maps. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DRegion_method_update_height: + +.. rst-class:: classref-method + +|void| **update_height**\ (\ height\: :ref:`float`\ ) :ref:`🔗` + +When sculpting, this is called to provide the current height. It may expand the vertical bounds, which is used to calculate the terrain AABB. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DRegion_method_update_heights: + +.. rst-class:: classref-method + +|void| **update_heights**\ (\ low_high\: :ref:`Vector2`\ ) :ref:`🔗` + +When sculpting the terrain, this is called to provide both a low and high height. It may expand the vertical bounds, which is used to calculate the terrain AABB. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DRegion_method_validate_map_size: + +.. rst-class:: classref-method + +:ref:`bool` **validate_map_size**\ (\ map\: :ref:`Image`\ ) |const| :ref:`🔗` + +This validates the map size according to previously loaded maps. + +.. |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.)` diff --git a/classes/class_worldscape3dtextureasset.rst b/classes/class_worldscape3dtextureasset.rst new file mode 100644 index 00000000000..28098f0c180 --- /dev/null +++ b/classes/class_worldscape3dtextureasset.rst @@ -0,0 +1,324 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Redot engine sources. +.. Generator: https://github.com/Redot-Engine/redot-engine/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/Redot-Engine/redot-engine/tree/master/modules/worldscape_3d/doc_classes/WorldScape3DTextureAsset.xml. + +.. _class_WorldScape3DTextureAsset: + +WorldScape3DTextureAsset +======================== + +**Inherits:** :ref:`WorldScape3DAssetResource` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` + +.. rst-class:: classref-introduction-group + +Description +----------- + +A set of texture files and settings that gets added to a :ref:`WorldScape3DAssets` resource. Textures must be prepared. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-----------------------------------+-------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Color` | :ref:`albedo_color` | ``Color(1, 1, 1, 1)`` | + +-----------------------------------+-------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Texture2D` | :ref:`albedo_texture` | | + +-----------------------------------+-------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`ao_strength` | ``0.5`` | + +-----------------------------------+-------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`detiling_rotation` | ``0.0`` | + +-----------------------------------+-------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`detiling_shift` | ``0.0`` | + +-----------------------------------+-------------------------------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`id` | ``0`` | + +-----------------------------------+-------------------------------------------------------------------------------------+-----------------------+ + | :ref:`String` | :ref:`name` | ``""`` | + +-----------------------------------+-------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`normal_depth` | ``0.5`` | + +-----------------------------------+-------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Texture2D` | :ref:`normal_texture` | | + +-----------------------------------+-------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`roughness` | ``0.0`` | + +-----------------------------------+-------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`uv_scale` | ``0.1`` | + +-----------------------------------+-------------------------------------------------------------------------------------+-----------------------+ + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +--------+-----------------------------------------------------------------+ + | |void| | :ref:`clear`\ (\ ) | + +--------+-----------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Signals +------- + +.. _class_WorldScape3DTextureAsset_signal_file_changed: + +.. rst-class:: classref-signal + +**file_changed**\ (\ ) :ref:`🔗` + +Emitted when :ref:`albedo_texture` or :ref:`normal_texture` are changed. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DTextureAsset_signal_id_changed: + +.. rst-class:: classref-signal + +**id_changed**\ (\ type\: :ref:`int`, old_id\: :ref:`int`, new_id\: :ref:`int`\ ) :ref:`🔗` + +Emitted when :ref:`id` is changed. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DTextureAsset_signal_setting_changed: + +.. rst-class:: classref-signal + +**setting_changed**\ (\ ) :ref:`🔗` + +Emitted when any setting is changed, other than id, albedo_texture, or normal_texture. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_WorldScape3DTextureAsset_property_albedo_color: + +.. rst-class:: classref-property + +:ref:`Color` **albedo_color** = ``Color(1, 1, 1, 1)`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_albedo_color**\ (\ value\: :ref:`Color`\ ) +- :ref:`Color` **get_albedo_color**\ (\ ) + +This color is multiplied by the albedo texture in the shader. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DTextureAsset_property_albedo_texture: + +.. rst-class:: classref-property + +:ref:`Texture2D` **albedo_texture** :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_albedo_texture**\ (\ value\: :ref:`Texture2D`\ ) +- :ref:`Texture2D` **get_albedo_texture**\ (\ ) + +The texture file with albedo on RGB and height on A. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DTextureAsset_property_ao_strength: + +.. rst-class:: classref-property + +:ref:`float` **ao_strength** = ``0.5`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_ao_strength**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_ao_strength**\ (\ ) + +The shader generates AO based on the height texture, based on this strength value. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DTextureAsset_property_detiling_rotation: + +.. rst-class:: classref-property + +:ref:`float` **detiling_rotation** = ``0.0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_detiling_rotation**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_detiling_rotation**\ (\ ) + +The shader rotates UV lookups in a detiling pattern based on this value. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DTextureAsset_property_detiling_shift: + +.. rst-class:: classref-property + +:ref:`float` **detiling_shift** = ``0.0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_detiling_shift**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_detiling_shift**\ (\ ) + +The shader laterally shifts UV lookups in a detiling pattern based on this value. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DTextureAsset_property_id: + +.. rst-class:: classref-property + +:ref:`int` **id** = ``0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_id**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_id**\ (\ ) + +The user settable ID of the texture, between 0 and 31. You can change this to reorder textures in the list, however it won't change the ID painted on the terrain. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DTextureAsset_property_name: + +.. rst-class:: classref-property + +:ref:`String` **name** = ``""`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_name**\ (\ value\: :ref:`String`\ ) +- :ref:`String` **get_name**\ (\ ) + +A user specified name for this texture set. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DTextureAsset_property_normal_depth: + +.. rst-class:: classref-property + +:ref:`float` **normal_depth** = ``0.5`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_normal_depth**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_normal_depth**\ (\ ) + +Increases or decreases the strength of the normal texture. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DTextureAsset_property_normal_texture: + +.. rst-class:: classref-property + +:ref:`Texture2D` **normal_texture** :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_normal_texture**\ (\ value\: :ref:`Texture2D`\ ) +- :ref:`Texture2D` **get_normal_texture**\ (\ ) + +The texture file with normal on RGB and roughness on A. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DTextureAsset_property_roughness: + +.. rst-class:: classref-property + +:ref:`float` **roughness** = ``0.0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_roughness**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_roughness**\ (\ ) + +Increases or decreases the roughness texture values. + +.. rst-class:: classref-item-separator + +---- + +.. _class_WorldScape3DTextureAsset_property_uv_scale: + +.. rst-class:: classref-property + +:ref:`float` **uv_scale** = ``0.1`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_uv_scale**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_uv_scale**\ (\ ) + +The scale of the textures. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_WorldScape3DTextureAsset_method_clear: + +.. rst-class:: classref-method + +|void| **clear**\ (\ ) :ref:`🔗` + +Clears the texture files and settings. + +.. |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.)` diff --git a/classes/index.rst b/classes/index.rst index 4eba42a0b5a..5b7005bb475 100644 --- a/classes/index.rst +++ b/classes/index.rst @@ -50,6 +50,7 @@ Nodes class_bone2d class_boneattachment3d class_boneconstraint3d + class_bonetwistdisperser3d class_boxcontainer class_button class_camera2d @@ -58,7 +59,9 @@ Nodes class_canvasitem class_canvaslayer class_canvasmodulate + class_ccdik3d class_centercontainer + class_chainik3d class_characterbody2d class_characterbody3d class_checkbox @@ -105,6 +108,7 @@ Nodes class_editorscriptpicker class_editorspinslider class_editortoaster + class_fabrik3d class_filedialog class_filesystemdock class_flowcontainer @@ -139,9 +143,12 @@ Nodes class_hslider class_hsplitcontainer class_httprequest + class_ikmodifier3d class_importermeshinstance3d class_instanceplaceholder class_itemlist + class_iterateik3d + class_jacobianik3d class_joint2d class_joint3d class_label @@ -151,6 +158,7 @@ Nodes class_lightmapgi class_lightmapprobe class_lightoccluder2d + class_limitangularvelocitymodifier3d class_line2d class_lineedit class_linkbutton @@ -163,6 +171,7 @@ Nodes class_meshinstance2d class_meshinstance3d class_missingnode + class_mode7sprite2d class_modifierbonetarget3d class_multimeshinstance2d class_multimeshinstance3d @@ -245,6 +254,7 @@ Nodes class_sliderjoint3d class_softbody3d class_spinbox + class_splineik3d class_splitcontainer class_spotlight3d class_springarm3d @@ -272,6 +282,7 @@ Nodes class_timer class_touchscreenbutton class_tree + class_twoboneik3d class_vboxcontainer class_vehiclebody3d class_vehiclewheel3d @@ -290,6 +301,7 @@ Nodes class_vsplitcontainer class_window class_worldenvironment + class_worldscape3d class_xranchor3d class_xrbodymodifier3d class_xrcamera3d @@ -479,6 +491,8 @@ Resources class_inputeventscreentouch class_inputeventshortcut class_inputeventwithmodifiers + class_jointlimitation3d + class_jointlimitationcone3d class_json class_labelsettings class_lightmapgidata @@ -487,6 +501,7 @@ Resources class_meshlibrary class_meshtexture class_missingresource + class_mode7scanlineoverride class_multimesh class_navigationmesh class_navigationmeshsourcegeometrydata2d @@ -720,6 +735,12 @@ Resources class_world3d class_worldboundaryshape2d class_worldboundaryshape3d + class_worldscape3dassetresource + class_worldscape3dassets + class_worldscape3dmaterial + class_worldscape3dmeshasset + class_worldscape3dregion + class_worldscape3dtextureasset class_x509certificate Other objects @@ -969,8 +990,8 @@ Other objects class_scriptlanguageextension class_semaphore class_shaderincludedb - class_signalsmith class_skinreference + class_soundsmith class_streampeer class_streampeerbuffer class_streampeerextension @@ -1014,6 +1035,10 @@ Other objects class_websocketpeer class_webxrinterface class_workerthreadpool + class_worldscape3dcollision + class_worldscape3ddata + class_worldscape3deditor + class_worldscape3dinstancer class_xmlparser class_xrbodytracker class_xrcontrollertracker @@ -1132,6 +1157,7 @@ Variant types class_signal class_string class_stringname + class_struct class_transform2d class_transform3d class_vector2