diff --git a/doc/classes/Basis.xml b/doc/classes/Basis.xml index 59c1195b003b..6edcc002f0fe 100644 --- a/doc/classes/Basis.xml +++ b/doc/classes/Basis.xml @@ -24,7 +24,7 @@ - Constructs a [Basis] identical to the [constant IDENTITY]. + Constructs a [Basis] identical to [constant IDENTITY]. [b]Note:[/b] In C#, this constructs a [Basis] with all of its components set to [constant Vector3.ZERO]. @@ -131,6 +131,7 @@ - The [member Vector3.y] contains the angle around the [member y] axis (yaw); - The [member Vector3.z] contains the angle around the [member z] axis (roll). The order of each consecutive rotation can be changed with [param order] (see [enum EulerOrder] constants). By default, the YXZ convention is used ([constant EULER_ORDER_YXZ]): Z (roll) is calculated first, then X (pitch), and lastly Y (yaw). When using the opposite method [method from_euler], this order is reversed. + [b]Note:[/b] This method assumes the basis is [i]uniform[/i] (all axes share the same length) (see [method get_scale]). [b]Note:[/b] Euler angles are much more intuitive but are not suitable for 3D math. Because of this, consider using the [method get_rotation_quaternion] method instead, which returns a [Quaternion]. [b]Note:[/b] In the Inspector dock, a basis's rotation is often displayed in Euler angles (in degrees), as is the case with the [member Node3D.rotation] property. @@ -145,7 +146,7 @@ - Returns the length of each axis of this basis, as a [Vector3]. If the basis is not sheared, this is the scaling factor. It is not affected by rotation. + Returns the length of each axis of this basis, as a [Vector3]. If the basis is not sheared, this value is the scaling factor. It is not affected by rotation. [codeblocks] [gdscript] var my_basis = Basis( @@ -242,8 +243,8 @@ - Returns this basis rotated around the given [param axis] by [param angle] (in radians). The [param axis] must be a normalized vector (see [method Vector3.normalized]). - Positive values rotate this basis clockwise around the axis, while negative values rotate it counterclockwise. + Returns a copy of this basis rotated around the given [param axis] by the given [param angle] (in radians). + The [param axis] must be a normalized vector (see [method Vector3.normalized]). If [param angle] is positive, the basis is rotated clockwise around the axis. [codeblocks] [gdscript] var my_basis = Basis.IDENTITY diff --git a/doc/classes/Quaternion.xml b/doc/classes/Quaternion.xml index c74a6453e08b..6911f668e257 100644 --- a/doc/classes/Quaternion.xml +++ b/doc/classes/Quaternion.xml @@ -21,7 +21,7 @@ - Constructs a [Quaternion] identical to the [constant IDENTITY]. + Constructs a [Quaternion] identical to [constant IDENTITY]. [b]Note:[/b] In C#, this constructs a [Quaternion] with all of its components set to [code]0.0[/code]. diff --git a/doc/classes/Transform2D.xml b/doc/classes/Transform2D.xml index 665e5e9d6753..ddbbae45bb1a 100644 --- a/doc/classes/Transform2D.xml +++ b/doc/classes/Transform2D.xml @@ -127,7 +127,7 @@ // Rotating the Transform2D in any way preserves its scale. myTransform = myTransform.Rotated(Mathf.Tau / 2.0f); - GD.Print(myTransform.GetScale()); // Prints (2, 4, 8). + GD.Print(myTransform.GetScale()); // Prints (2, 4). [/csharp] [/codeblocks] [b]Note:[/b] If the value returned by [method determinant] is negative, the scale is also negative. @@ -191,7 +191,8 @@ - Returns a copy of the transform rotated by the given [param angle] (in radians). + Returns a copy of this transform rotated by the given [param angle] (in radians). + If [param angle] is positive, the transform is rotated clockwise. 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. diff --git a/doc/classes/Transform3D.xml b/doc/classes/Transform3D.xml index 98e9d56adbd2..fdea90da07f6 100644 --- a/doc/classes/Transform3D.xml +++ b/doc/classes/Transform3D.xml @@ -20,7 +20,7 @@ - Constructs a [Transform3D] identical to the [constant IDENTITY]. + Constructs a [Transform3D] identical to [constant IDENTITY]. [b]Note:[/b] In C#, this constructs a [Transform3D] with its [member origin] and the components of its [member basis] set to [constant Vector3.ZERO]. @@ -62,7 +62,7 @@ - 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]. + 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 inverse]. [b]Note:[/b] For this method to return correctly, the transform's [member basis] needs to have a determinant that is not exactly [code]0[/code] (see [method Basis.determinant]). @@ -78,8 +78,8 @@ - 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. + Returns the [url=https://en.wikipedia.org/wiki/Invertible_matrix]inverted version of this transform[/url]. 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 orthonormalized]). That means, the basis should only represent a rotation. If it does not, use [method affine_inverse] instead. @@ -118,7 +118,7 @@ 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. + The [param axis] must be a normalized vector (see [method Vector3.normalized]). If [param angle] is positive, the basis is rotated clockwise around the axis. 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.