diff options
Diffstat (limited to 'doc/classes')
-rw-r--r-- | doc/classes/Environment.xml | 18 | ||||
-rw-r--r-- | doc/classes/Parallax2D.xml | 46 | ||||
-rw-r--r-- | doc/classes/RandomNumberGenerator.xml | 6 | ||||
-rw-r--r-- | doc/classes/RenderingServer.xml | 9 | ||||
-rw-r--r-- | doc/classes/RichTextLabel.xml | 5 | ||||
-rw-r--r-- | doc/classes/TextMesh.xml | 1 | ||||
-rw-r--r-- | doc/classes/Transform3D.xml | 78 |
7 files changed, 123 insertions, 40 deletions
diff --git a/doc/classes/Environment.xml b/doc/classes/Environment.xml index 6913d1f75c..bf91d02b3a 100644 --- a/doc/classes/Environment.xml +++ b/doc/classes/Environment.xml @@ -127,13 +127,15 @@ </member> <member name="glow_blend_mode" type="int" setter="set_glow_blend_mode" getter="get_glow_blend_mode" enum="Environment.GlowBlendMode" default="2"> The glow blending mode. + [b]Note:[/b] [member glow_blend_mode] has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices. </member> <member name="glow_bloom" type="float" setter="set_glow_bloom" getter="get_glow_bloom" default="0.0"> The bloom's intensity. If set to a value higher than [code]0[/code], this will make glow visible in areas darker than the [member glow_hdr_threshold]. </member> <member name="glow_enabled" type="bool" setter="set_glow_enabled" getter="is_glow_enabled" default="false"> - If [code]true[/code], the glow effect is enabled. - [b]Note:[/b] Glow is only supported in the Forward+ and Mobile rendering methods, not Compatibility. When using the Mobile rendering method, glow will look different due to the lower dynamic range available in the Mobile rendering method. + If [code]true[/code], the glow effect is enabled. This simulates real world eye/camera behavior where bright pixels bleed onto surrounding pixels. + [b]Note:[/b] When using the Mobile rendering method, glow looks different due to the lower dynamic range available in the Mobile rendering method. + [b]Note:[/b] When using the Compatibility rendering method, glow uses a different implementation with some properties being unavailable and hidden from the inspector: [code]glow_levels/*[/code], [member glow_normalized], [member glow_strength], [member glow_blend_mode], [member glow_mix], [member glow_map], and [member glow_map_strength]. This implementation is optimized to run on low-end devices and is less flexible as a result. </member> <member name="glow_hdr_luminance_cap" type="float" setter="set_glow_hdr_luminance_cap" getter="get_glow_hdr_luminance_cap" default="12.0"> The higher threshold of the HDR glow. Areas brighter than this threshold will be clamped for the purposes of the glow effect. @@ -149,40 +151,52 @@ </member> <member name="glow_levels/1" type="float" setter="set_glow_level" getter="get_glow_level" default="0.0"> The intensity of the 1st level of glow. This is the most "local" level (least blurry). + [b]Note:[/b] [member glow_levels/1] has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices. </member> <member name="glow_levels/2" type="float" setter="set_glow_level" getter="get_glow_level" default="0.0"> The intensity of the 2nd level of glow. + [b]Note:[/b] [member glow_levels/2] has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices. </member> <member name="glow_levels/3" type="float" setter="set_glow_level" getter="get_glow_level" default="1.0"> The intensity of the 3rd level of glow. + [b]Note:[/b] [member glow_levels/3] has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices. </member> <member name="glow_levels/4" type="float" setter="set_glow_level" getter="get_glow_level" default="0.0"> The intensity of the 4th level of glow. + [b]Note:[/b] [member glow_levels/4] has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices. </member> <member name="glow_levels/5" type="float" setter="set_glow_level" getter="get_glow_level" default="1.0"> The intensity of the 5th level of glow. + [b]Note:[/b] [member glow_levels/5] has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices. </member> <member name="glow_levels/6" type="float" setter="set_glow_level" getter="get_glow_level" default="0.0"> The intensity of the 6th level of glow. + [b]Note:[/b] [member glow_levels/6] has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices. </member> <member name="glow_levels/7" type="float" setter="set_glow_level" getter="get_glow_level" default="0.0"> The intensity of the 7th level of glow. This is the most "global" level (blurriest). + [b]Note:[/b] [member glow_levels/7] has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices. </member> <member name="glow_map" type="Texture" setter="set_glow_map" getter="get_glow_map"> The texture that should be used as a glow map to [i]multiply[/i] the resulting glow color according to [member glow_map_strength]. This can be used to create a "lens dirt" effect. The texture's RGB color channels are used for modulation, but the alpha channel is ignored. [b]Note:[/b] The texture will be stretched to fit the screen. Therefore, it's recommended to use a texture with an aspect ratio that matches your project's base aspect ratio (typically 16:9). + [b]Note:[/b] [member glow_map] has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices. </member> <member name="glow_map_strength" type="float" setter="set_glow_map_strength" getter="get_glow_map_strength" default="0.8"> How strong of an impact the [member glow_map] should have on the overall glow effect. A strength of [code]0.0[/code] means the glow map has no effect on the overall glow effect. A strength of [code]1.0[/code] means the glow has a full effect on the overall glow effect (and can turn off glow entirely in specific areas of the screen if the glow map has black areas). + [b]Note:[/b] [member glow_map_strength] has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices. </member> <member name="glow_mix" type="float" setter="set_glow_mix" getter="get_glow_mix" default="0.05"> When using the [constant GLOW_BLEND_MODE_MIX] [member glow_blend_mode], this controls how much the source image is blended with the glow layer. A value of [code]0.0[/code] makes the glow rendering invisible, while a value of [code]1.0[/code] is equivalent to [constant GLOW_BLEND_MODE_REPLACE]. + [b]Note:[/b] [member glow_mix] has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices. </member> <member name="glow_normalized" type="bool" setter="set_glow_normalized" getter="is_glow_normalized" default="false"> If [code]true[/code], glow levels will be normalized so that summed together their intensities equal [code]1.0[/code]. + [b]Note:[/b] [member glow_normalized] has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices. </member> <member name="glow_strength" type="float" setter="set_glow_strength" getter="get_glow_strength" default="1.0"> The strength of the glow effect. This applies as the glow is blurred across the screen and increases the distance and intensity of the blur. When using the Mobile rendering method, this should be increased to compensate for the lower dynamic range. + [b]Note:[/b] [member glow_strength] has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices. </member> <member name="reflected_light_source" type="int" setter="set_reflection_source" getter="get_reflection_source" enum="Environment.ReflectionSource" default="0"> The reflected (specular) light source. diff --git a/doc/classes/Parallax2D.xml b/doc/classes/Parallax2D.xml new file mode 100644 index 0000000000..6db29b7a33 --- /dev/null +++ b/doc/classes/Parallax2D.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="Parallax2D" inherits="Node2D" experimental="This node is meant to replace [ParallaxBackground] and [ParallaxLayer]. The implementation may change in the future." xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> + <brief_description> + A node used to create a parallax scrolling background. + </brief_description> + <description> + A [Parallax2D] is used to create a parallax effect. It can move at a different speed relative to the camera movement using [member scroll_scale]. This creates an illusion of depth in a 2D game. If manual scrolling is desired, the [Camera2D] position can be ignored with [member ignore_camera_scroll]. + [b]Note:[/b] Any changes to this node's position made after it enters the scene tree will be overridden if [member ignore_camera_scroll] is [code]false[/code] or [member screen_offset] is modified. + </description> + <tutorials> + </tutorials> + <members> + <member name="autoscroll" type="Vector2" setter="set_autoscroll" getter="get_autoscroll" default="Vector2(0, 0)"> + Velocity at which the offset scrolls automatically, in pixels per second. + </member> + <member name="follow_viewport" type="bool" setter="set_follow_viewport" getter="get_follow_viewport" default="true"> + If [code]true[/code], this [Parallax2D] is offset by the current camera's position. If the [Parallax2D] is in a [CanvasLayer] separate from the current camera, it may be desired to match the value with [member CanvasLayer.follow_viewport_enabled]. + </member> + <member name="ignore_camera_scroll" type="bool" setter="set_ignore_camera_scroll" getter="is_ignore_camera_scroll" default="false"> + If [code]true[/code], [Parallax2D]'s position is not affected by the position of the camera. + </member> + <member name="limit_begin" type="Vector2" setter="set_limit_begin" getter="get_limit_begin" default="Vector2(-1e+07, -1e+07)"> + Top-left limits for scrolling to begin. If the camera is outside of this limit, the [Parallax2D] stops scrolling. Must be lower than [member limit_end] minus the viewport size to work. + </member> + <member name="limit_end" type="Vector2" setter="set_limit_end" getter="get_limit_end" default="Vector2(1e+07, 1e+07)"> + Bottom-right limits for scrolling to end. If the camera is outside of this limit, the [Parallax2D] will stop scrolling. Must be higher than [member limit_begin] and the viewport size combined to work. + </member> + <member name="repeat_size" type="Vector2" setter="set_repeat_size" getter="get_repeat_size" default="Vector2(0, 0)"> + Repeats the [Texture2D] of each of this node's children and offsets them by this value. When scrolling, the node's position loops, giving the illusion of an infinite scrolling background if the values are larger than the screen size. If an axis is set to [code]0[/code], the [Texture2D] will not be repeated. + </member> + <member name="repeat_times" type="int" setter="set_repeat_times" getter="get_repeat_times" default="1"> + Overrides the amount of times the texture repeats. Each texture copy spreads evenly from the original by [member repeat_size]. Useful for when zooming out with a camera. + </member> + <member name="screen_offset" type="Vector2" setter="set_screen_offset" getter="get_screen_offset" default="Vector2(0, 0)"> + Offset used to scroll this [Parallax2D]. This value is updated automatically unless [member ignore_camera_scroll] is [code]true[/code]. + </member> + <member name="scroll_offset" type="Vector2" setter="set_scroll_offset" getter="get_scroll_offset" default="Vector2(0, 0)"> + The [Parallax2D]'s offset. Similar to [member screen_offset] and [member Node2D.position], but will not be overridden. + [b]Note:[/b] Values will loop if [member repeat_size] is set higher than [code]0[/code]. + </member> + <member name="scroll_scale" type="Vector2" setter="set_scroll_scale" getter="get_scroll_scale" default="Vector2(1, 1)"> + Multiplier to the final [Parallax2D]'s offset. Can be used to simulate distance from the camera. + For example, a value of [code]1[/code] scrolls at the same speed as the camera. A value greater than [code]1[/code] scrolls faster, making objects appear closer. Less than [code]1[/code] scrolls slower, making object appear closer and a value of [code]0[/code] stops the objects completely. + </member> + </members> +</class> diff --git a/doc/classes/RandomNumberGenerator.xml b/doc/classes/RandomNumberGenerator.xml index e005c1c22c..44e29d2322 100644 --- a/doc/classes/RandomNumberGenerator.xml +++ b/doc/classes/RandomNumberGenerator.xml @@ -24,13 +24,13 @@ Returns a random index with non-uniform weights. Prints an error and returns [code]-1[/code] if the array is empty. [codeblocks] [gdscript] - var rnd = RandomNumberGenerator.new() + var rng = RandomNumberGenerator.new() - var my_array = ["one", "two", "three, "four"] + var my_array = ["one", "two", "three", "four"] var weights = PackedFloat32Array([0.5, 1, 1, 2]) # Prints one of the four elements in `my_array`. - # It is more likely to print "four", and less likely to print "two". + # It is more likely to print "four", and less likely to print "one". print(my_array[rng.rand_weighted(weights)]) [/gdscript] [/codeblocks] diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml index bc4f3a9052..152518e7da 100644 --- a/doc/classes/RenderingServer.xml +++ b/doc/classes/RenderingServer.xml @@ -869,6 +869,15 @@ A copy of the canvas item will be drawn with a local offset of the mirroring [Vector2]. </description> </method> + <method name="canvas_set_item_repeat"> + <return type="void" /> + <param index="0" name="item" type="RID" /> + <param index="1" name="repeat_size" type="Vector2" /> + <param index="2" name="repeat_times" type="int" /> + <description> + A copy of the canvas item will be drawn with a local offset of the [param repeat_size] by the number of times of the [param repeat_times]. As the [param repeat_times] increases, the copies will spread away from the origin texture. + </description> + </method> <method name="canvas_set_modulate"> <return type="void" /> <param index="0" name="canvas" type="RID" /> diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml index 6e37e395a2..b9a6b06fe3 100644 --- a/doc/classes/RichTextLabel.xml +++ b/doc/classes/RichTextLabel.xml @@ -55,8 +55,8 @@ <method name="clear"> <return type="void" /> <description> - Clears the tag stack. - [b]Note:[/b] This method will not modify [member text], but setting [member text] to an empty string also clears the stack. + Clears the tag stack, causing the label to display nothing. + [b]Note:[/b] This method does not affect [member text], and its contents will show again if the label is redrawn. However, setting [member text] to an empty [String] also clears the stack. </description> </method> <method name="deselect"> @@ -594,6 +594,7 @@ </member> <member name="bbcode_enabled" type="bool" setter="set_use_bbcode" getter="is_using_bbcode" default="false"> If [code]true[/code], the label uses BBCode formatting. + [b]Note:[/b] This only affects the contents of [member text], not the tag stack. </member> <member name="clip_contents" type="bool" setter="set_clip_contents" getter="is_clipping_contents" overrides="Control" default="true" /> <member name="context_menu_enabled" type="bool" setter="set_context_menu_enabled" getter="is_context_menu_enabled" default="false"> diff --git a/doc/classes/TextMesh.xml b/doc/classes/TextMesh.xml index 00c6b0b1a8..9e705311c5 100644 --- a/doc/classes/TextMesh.xml +++ b/doc/classes/TextMesh.xml @@ -53,6 +53,7 @@ </member> <member name="text" type="String" setter="set_text" getter="get_text" default=""""> The text to generate mesh from. + [b]Note:[/b] Due to being a [Resource], it doesn't follow the rules of [member Node.auto_translate_mode]. If disabling translation is desired, it should be done manually with [method Object.set_message_translation]. </member> <member name="text_direction" type="int" setter="set_text_direction" getter="get_text_direction" enum="TextServer.Direction" default="0"> Base text writing direction. diff --git a/doc/classes/Transform3D.xml b/doc/classes/Transform3D.xml index a1ddb75bc2..e4394e9c70 100644 --- a/doc/classes/Transform3D.xml +++ b/doc/classes/Transform3D.xml @@ -4,8 +4,9 @@ A 3×4 matrix representing a 3D transformation. </brief_description> <description> - A 3×4 matrix (3 rows, 4 columns) used for 3D linear transformations. It can represent transformations such as translation, rotation, and scaling. It consists of a [member basis] (first 3 columns) and a [Vector3] for the [member origin] (last column). + The [Transform3D] built-in [Variant] type is a 3×4 matrix representing a transformation in 3D space. It contains a [Basis], which on its own can represent rotation, scale, and shear. Additionally, combined with its own [member origin], the transform can also represent a translation. For a general introduction, see the [url=$DOCS_URL/tutorials/math/matrices_and_transforms.html]Matrices and transforms[/url] tutorial. + [b]Note:[/b] Godot uses a [url=https://en.wikipedia.org/wiki/Right-hand_rule]right-handed coordinate system[/url], which is a common standard. For directions, the convention for built-in types like [Camera3D] is for -Z to point forward (+X is right, +Y is up, and +Z is back). Other objects may use different direction conventions. For more information, see the [url=$DOCS_URL/tutorials/assets_pipeline/importing_scenes.html#d-asset-direction-conventions]Importing 3D Scenes[/url] tutorial. </description> <tutorials> <link title="Math documentation index">$DOCS_URL/tutorials/math/index.html</link> @@ -19,7 +20,7 @@ <constructor name="Transform3D"> <return type="Transform3D" /> <description> - Constructs a default-initialized [Transform3D] set to [constant IDENTITY]. + Constructs a [Transform3D] identical to the [constant IDENTITY]. </description> </constructor> <constructor name="Transform3D"> @@ -34,14 +35,14 @@ <param index="0" name="basis" type="Basis" /> <param index="1" name="origin" type="Vector3" /> <description> - Constructs a Transform3D from a [Basis] and [Vector3]. + Constructs a [Transform3D] from a [Basis] and [Vector3]. </description> </constructor> <constructor name="Transform3D"> <return type="Transform3D" /> <param index="0" name="from" type="Projection" /> <description> - Constructs a Transform3D from a [Projection] by trimming the last row of the projection matrix ([code]from.x.w[/code], [code]from.y.w[/code], [code]from.z.w[/code], and [code]from.w.w[/code] are not copied over). + Constructs a [Transform3D] from a [Projection]. Because [Transform3D] is a 3×4 matrix and [Projection] is a 4×4 matrix, this operation trims the last row of the projection matrix ([code]from.x.w[/code], [code]from.y.w[/code], [code]from.z.w[/code], and [code]from.w.w[/code] are not included in the new transform). </description> </constructor> <constructor name="Transform3D"> @@ -51,7 +52,8 @@ <param index="2" name="z_axis" type="Vector3" /> <param index="3" name="origin" type="Vector3" /> <description> - Constructs a Transform3D from four [Vector3] values (matrix columns). Each axis corresponds to local basis vectors (some of which may be scaled). + Constructs a [Transform3D] from four [Vector3] values (also called matrix columns). + The first three arguments are the [member basis]'s axes ([member Basis.x], [member Basis.y], and [member Basis.z]). </description> </constructor> </constructors> @@ -59,7 +61,8 @@ <method name="affine_inverse" qualifiers="const"> <return type="Transform3D" /> <description> - Returns the inverse of the transform, under the assumption that the basis is invertible (must have non-zero determinant). + Returns the inverted version of this transform. Unlike [method inverse], this method works with almost any [member basis], including non-uniform ones, but is slower. See also [method Basis.inverse]. + [b]Note:[/b] For this method to return correctly, the transform's [member basis] needs to not have a determinant of exactly [code]0[/code] (see [method Basis.determinant]). </description> </method> <method name="interpolate_with" qualifiers="const"> @@ -67,13 +70,15 @@ <param index="0" name="xform" type="Transform3D" /> <param index="1" name="weight" type="float" /> <description> - Returns a transform interpolated between this transform and another by a given [param weight] (on the range of 0.0 to 1.0). + Returns the result of the linear interpolation between this transform and [param xform] by the given [param weight]. + The [param weight] should be between [code]0.0[/code] and [code]1.0[/code] (inclusive). Values outside this range are allowed and can be used to perform [i]extrapolation[/i], instead. </description> </method> <method name="inverse" qualifiers="const"> <return type="Transform3D" /> <description> - Returns the inverse of the transform, under the assumption that the transformation basis is orthonormal (i.e. rotation/reflection is fine, scaling/skew is not). Use [method affine_inverse] for non-orthonormal transforms (e.g. with scaling). + Returns the inverted version of this transform. See also [method Basis.inverse]. + [b]Note:[/b] For this method to return correctly, the transform's [member basis] needs to be [i]orthonormal[/i] (see [method Basis.orthonormalized]). That means, the basis should only represent a rotation. If it does not, use [method affine_inverse] instead. </description> </method> <method name="is_equal_approx" qualifiers="const"> @@ -95,7 +100,7 @@ <param index="1" name="up" type="Vector3" default="Vector3(0, 1, 0)" /> <param index="2" name="use_model_front" type="bool" default="false" /> <description> - Returns a copy of the transform rotated such that the forward axis (-Z) points towards the [param target] position. + Returns a copy of this transform rotated so that the forward axis (-Z) points towards the [param target] position. The up axis (+Y) points as close to the [param up] vector as possible while staying perpendicular to the forward axis. The resulting transform is orthonormalized. The existing rotation, scale, and skew information from the original transform is discarded. The [param target] and [param up] vectors cannot be zero, cannot be parallel to each other, and are defined in global/parent space. If [param use_model_front] is [code]true[/code], the +Z axis (asset front) is treated as forward (implies +X is left) and points toward the [param target] position. By default, the -Z axis (camera forward) is treated as forward (implies +X is right). </description> @@ -103,7 +108,7 @@ <method name="orthonormalized" qualifiers="const"> <return type="Transform3D" /> <description> - Returns the transform with the basis orthogonal (90 degrees), and normalized axis vectors (scale of 1 or -1). + Returns a copy of this transform with its [member basis] orthonormalized. An orthonormal basis is both [i]orthogonal[/i] (the axes are perpendicular to each other) and [i]normalized[/i] (the axes have a length of [code]1[/code]), which also means it can only represent rotation. See also [method Basis.orthonormalized]. </description> </method> <method name="rotated" qualifiers="const"> @@ -111,7 +116,7 @@ <param index="0" name="axis" type="Vector3" /> <param index="1" name="angle" type="float" /> <description> - Returns a copy of the transform rotated around the given [param axis] by the given [param angle] (in radians). + Returns a copy of this transform rotated around the given [param axis] by the given [param angle] (in radians). The [param axis] must be a normalized vector. This method is an optimized version of multiplying the given transform [code]X[/code] with a corresponding rotation transform [code]R[/code] from the left, i.e., [code]R * X[/code]. This can be seen as transforming with respect to the global/parent frame. @@ -122,7 +127,7 @@ <param index="0" name="axis" type="Vector3" /> <param index="1" name="angle" type="float" /> <description> - Returns a copy of the transform rotated around the given [param axis] by the given [param angle] (in radians). + Returns a copy of this transform rotated around the given [param axis] by the given [param angle] (in radians). The [param axis] must be a normalized vector. This method is an optimized version of multiplying the given transform [code]X[/code] with a corresponding rotation transform [code]R[/code] from the right, i.e., [code]X * R[/code]. This can be seen as transforming with respect to the local frame. @@ -132,7 +137,7 @@ <return type="Transform3D" /> <param index="0" name="scale" type="Vector3" /> <description> - Returns a copy of the transform scaled by the given [param scale] factor. + Returns a copy of this transform scaled by the given [param scale] factor. This method is an optimized version of multiplying the given transform [code]X[/code] with a corresponding scaling transform [code]S[/code] from the left, i.e., [code]S * X[/code]. This can be seen as transforming with respect to the global/parent frame. </description> @@ -141,7 +146,7 @@ <return type="Transform3D" /> <param index="0" name="scale" type="Vector3" /> <description> - Returns a copy of the transform scaled by the given [param scale] factor. + Returns a copy of this transform scaled by the given [param scale] factor. This method is an optimized version of multiplying the given transform [code]X[/code] with a corresponding scaling transform [code]S[/code] from the right, i.e., [code]X * S[/code]. This can be seen as transforming with respect to the local frame. </description> @@ -150,7 +155,7 @@ <return type="Transform3D" /> <param index="0" name="offset" type="Vector3" /> <description> - Returns a copy of the transform translated by the given [param offset]. + Returns a copy of this transform translated by the given [param offset]. This method is an optimized version of multiplying the given transform [code]X[/code] with a corresponding translation transform [code]T[/code] from the left, i.e., [code]T * X[/code]. This can be seen as transforming with respect to the global/parent frame. </description> @@ -159,7 +164,7 @@ <return type="Transform3D" /> <param index="0" name="offset" type="Vector3" /> <description> - Returns a copy of the transform translated by the given [param offset]. + Returns a copy of this transform translated by the given [param offset]. This method is an optimized version of multiplying the given transform [code]X[/code] with a corresponding translation transform [code]T[/code] from the right, i.e., [code]X * T[/code]. This can be seen as transforming with respect to the local frame. </description> @@ -167,24 +172,25 @@ </methods> <members> <member name="basis" type="Basis" setter="" getter="" default="Basis(1, 0, 0, 0, 1, 0, 0, 0, 1)"> - The basis is a matrix containing 3 [Vector3] as its columns: X axis, Y axis, and Z axis. These vectors can be interpreted as the basis vectors of local coordinate system traveling with the object. + The [Basis] of this transform. It is composed by 3 axes ([member Basis.x], [member Basis.y], and [member Basis.z]). Together, these represent the transform's rotation, scale, and shearing. </member> <member name="origin" type="Vector3" setter="" getter="" default="Vector3(0, 0, 0)"> - The translation offset of the transform (column 3, the fourth column). Equivalent to array index [code]3[/code]. + The translation offset of this transform. In 3D space, this can be seen as the position. </member> </members> <constants> <constant name="IDENTITY" value="Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)"> - [Transform3D] with no translation, rotation or scaling applied. When applied to other data structures, [constant IDENTITY] performs no transformation. + A transform with no translation, no rotation, and its scale being [code]1[/code]. Its [member basis] is equal to [constant Basis.IDENTITY]. + When multiplied by another [Variant] such as [AABB] or another [Transform3D], no transformation occurs. </constant> <constant name="FLIP_X" value="Transform3D(-1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)"> - [Transform3D] with mirroring applied perpendicular to the YZ plane. + [Transform3D] with mirroring applied perpendicular to the YZ plane. Its [member basis] is equal to [constant Basis.FLIP_X]. </constant> <constant name="FLIP_Y" value="Transform3D(1, 0, 0, 0, -1, 0, 0, 0, 1, 0, 0, 0)"> - [Transform3D] with mirroring applied perpendicular to the XZ plane. + [Transform3D] with mirroring applied perpendicular to the XZ plane. Its [member basis] is equal to [constant Basis.FLIP_Y]. </constant> <constant name="FLIP_Z" value="Transform3D(1, 0, 0, 0, 1, 0, 0, 0, -1, 0, 0, 0)"> - [Transform3D] with mirroring applied perpendicular to the XY plane. + [Transform3D] with mirroring applied perpendicular to the XY plane. Its [member basis] is equal to [constant Basis.FLIP_Z]. </constant> </constants> <operators> @@ -192,7 +198,7 @@ <return type="bool" /> <param index="0" name="right" type="Transform3D" /> <description> - Returns [code]true[/code] if the transforms are not equal. + Returns [code]true[/code] if the components of both transforms are not equal. [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable. </description> </operator> @@ -200,70 +206,76 @@ <return type="AABB" /> <param index="0" name="right" type="AABB" /> <description> - Transforms (multiplies) the [AABB] by the given [Transform3D] matrix. + Transforms (multiplies) the [AABB] by this transformation matrix. </description> </operator> <operator name="operator *"> <return type="PackedVector3Array" /> <param index="0" name="right" type="PackedVector3Array" /> <description> - Transforms (multiplies) each element of the [Vector3] array by the given [Transform3D] matrix. + Transforms (multiplies) every [Vector3] element of the given [PackedVector3Array] by this transformation matrix. + On larger arrays, this operation is much faster than transforming each [Vector3] individually. </description> </operator> <operator name="operator *"> <return type="Plane" /> <param index="0" name="right" type="Plane" /> <description> - Transforms (multiplies) the [Plane] by the given [Transform3D] transformation matrix. + Transforms (multiplies) the [Plane] by this transformation matrix. </description> </operator> <operator name="operator *"> <return type="Transform3D" /> <param index="0" name="right" type="Transform3D" /> <description> - Composes these two transformation matrices by multiplying them together. This has the effect of transforming the second transform (the child) by the first transform (the parent). + Transforms (multiplies) this transform by the [param right] transform. + This is the operation performed between parent and child [Node3D]s. + [b]Note:[/b] If you need to only modify one attribute of this transform, consider using one of the following methods, instead: + - For translation, see [method translated] or [method translated_local]. + - For rotation, see [method rotated] or [method rotated_local]. + - For scale, see [method scaled] or [method scaled_local]. </description> </operator> <operator name="operator *"> <return type="Vector3" /> <param index="0" name="right" type="Vector3" /> <description> - Transforms (multiplies) the [Vector3] by the given [Transform3D] matrix. + Transforms (multiplies) the [Vector3] by this transformation matrix. </description> </operator> <operator name="operator *"> <return type="Transform3D" /> <param index="0" name="right" type="float" /> <description> - This operator multiplies all components of the [Transform3D], including the [member origin] vector, which scales it uniformly. + Multiplies all components of the [Transform3D] by the given [float], including the [member origin]. This affects the transform's scale uniformly, also resizing the [member basis]. </description> </operator> <operator name="operator *"> <return type="Transform3D" /> <param index="0" name="right" type="int" /> <description> - This operator multiplies all components of the [Transform3D], including the [member origin] vector, which scales it uniformly. + Multiplies all components of the [Transform3D] by the given [int], including the [member origin]. This affects the transform's scale uniformly, also resizing the [member basis]. </description> </operator> <operator name="operator /"> <return type="Transform3D" /> <param index="0" name="right" type="float" /> <description> - This operator divides all components of the [Transform3D], including the [member origin] vector, which inversely scales it uniformly. + Divides all components of the [Transform3D] by the given [float], including the [member origin]. This affects the transform's scale uniformly, also resizing the [member basis]. </description> </operator> <operator name="operator /"> <return type="Transform3D" /> <param index="0" name="right" type="int" /> <description> - This operator divides all components of the [Transform3D], including the [member origin] vector, which inversely scales it uniformly. + Divides all components of the [Transform3D] by the given [int], including the [member origin]. This affects the transform's scale uniformly, also resizing the [member basis]. </description> </operator> <operator name="operator =="> <return type="bool" /> <param index="0" name="right" type="Transform3D" /> <description> - Returns [code]true[/code] if the transforms are exactly equal. + Returns [code]true[/code] if the components of both transforms are exactly equal. [b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable. </description> </operator> |