diff options
author | Ferenc Arn <tagcup@yahoo.com> | 2017-04-05 17:47:13 -0500 |
---|---|---|
committer | Ferenc Arn <tagcup@yahoo.com> | 2017-04-06 13:03:56 -0500 |
commit | 9a37ff1e34fe445a9168a7d91ae1df7d9928eb25 (patch) | |
tree | f524cd3d1fd4c31e7e1fe868eea45d3d3086c2f6 /doc | |
parent | 454f53c77659721a529c48fd4be6bf80d33c0082 (diff) |
Added various functions basic math classes. Also enabled math checks only for debug builds.
Added set_scale, set_rotation_euler, set_rotation_axis_angle. Addresses #2565 directly.
Added an euler angle constructor for Basis in GDScript and also exposed is_normalized for vectors and quaternions.
Various other changes mostly cosmetic in nature.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/base/classes.xml | 62 |
1 files changed, 60 insertions, 2 deletions
diff --git a/doc/base/classes.xml b/doc/base/classes.xml index 5bb85aedc1..aa520d3869 100644 --- a/doc/base/classes.xml +++ b/doc/base/classes.xml @@ -6842,6 +6842,15 @@ <method name="Basis"> <return type="Basis"> </return> + <argument index="0" name="euler" type="Vector3"> + </argument> + <description> + Create a rotation matrix (in the XYZ convention: first Z, then Y, and X last) from the specified Euler angles, given in the vector format as (third,second,first). + </description> + </method> + <method name="Basis"> + <return type="Basis"> + </return> <argument index="0" name="x_axis" type="Vector3"> </argument> <argument index="1" name="y_axis" type="Vector3"> @@ -6863,8 +6872,7 @@ <return type="Vector3"> </return> <description> - Return Euler angles (in the XYZ convention: first Z, then Y, and X last) from the matrix. Returned vector contains the rotation angles in the format (third,second,first). - This function only works if the matrix represents a proper rotation. + Assuming that the matrix is a proper rotation matrix (orthonormal matrix with determinant +1), return Euler angles (in the XYZ convention: first Z, then Y, and X last). Returned vector contains the rotation angles in the format (third,second,first). </description> </method> <method name="get_orthogonal_index"> @@ -6906,6 +6914,26 @@ Introduce an additional rotation around the given axis by phi. Only relevant when the matrix is being used as a part of [Transform]. The axis must be a normalized vector. </description> </method> + <method name="set_rotation_euler"> + <return type="Basis"> + </return> + <argument index="0" name="euler" type="Vector3"> + </argument> + <description> + Changes only the rotation part of the [Basis] to a rotation corresponding to given Euler angles, while preserving the scaling part (as determined by get_scale). + </description> + </method> + <method name="set_rotation_axis_angle"> + <return type="Basis"> + </return> + <argument index="0" name="axis" type="Vector3"> + </argument> + <argument index="1" name="phi" type="float"> + </argument> + <description> + Changes only the rotation part of the [Basis] to a rotation around given axis by phi, while preserving the scaling part (as determined by get_scale). + </description> + </method> <method name="scaled"> <return type="Basis"> </return> @@ -6915,6 +6943,15 @@ Introduce an additional scaling specified by the given 3D scaling factor. Only relevant when the matrix is being used as a part of [Transform]. </description> </method> + <method name="set_scale"> + <return type="Basis"> + </return> + <argument index="0" name="scale" type="Vector3"> + </argument> + <description> + Changes only the scaling part of the Basis to the specified scaling, while preserving the rotation part (as determined by get_rotation). + </description> + </method> <method name="tdotx"> <return type="float"> </return> @@ -34942,6 +34979,13 @@ Returns a copy of the quaternion, normalized to unit length. </description> </method> + <method name="is_normalized"> + <return type="bool"> + </return> + <description> + Returns whether the quaternion is normalized or not. + </description> + </method> <method name="slerp"> <return type="Quat"> </return> @@ -47093,6 +47137,13 @@ do_property]. Returns a normalized vector to unit length. </description> </method> + <method name="is_normalized"> + <return type="bool"> + </return> + <description> + Returns whether the vector is normalized or not. + </description> + </method> <method name="reflect"> <return type="Vector2"> </return> @@ -47317,6 +47368,13 @@ do_property]. Return a copy of the normalized vector to unit length. This is the same as v / v.length(). </description> </method> + <method name="is_normalized"> + <return type="bool"> + </return> + <description> + Returns whether the vector is normalized or not. + </description> + </method> <method name="outer"> <return type="Basis"> </return> |