class_matrix3.rst 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead.
  3. .. _class_Matrix3:
  4. Matrix3
  5. =======
  6. **Category:** Built-In Types
  7. Brief Description
  8. -----------------
  9. 3x3 matrix datatype.
  10. Member Functions
  11. ----------------
  12. +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  13. | :ref:`Matrix3<class_matrix3>` | :ref:`Matrix3<class_Matrix3_Matrix3>` **(** :ref:`Quat<class_quat>` from **)** |
  14. +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  15. | :ref:`Matrix3<class_matrix3>` | :ref:`Matrix3<class_Matrix3_Matrix3>` **(** :ref:`Vector3<class_vector3>` axis, :ref:`float<class_float>` phi **)** |
  16. +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  17. | :ref:`Matrix3<class_matrix3>` | :ref:`Matrix3<class_Matrix3_Matrix3>` **(** :ref:`Vector3<class_vector3>` x_axis, :ref:`Vector3<class_vector3>` y_axis, :ref:`Vector3<class_vector3>` z_axis **)** |
  18. +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  19. | :ref:`float<class_float>` | :ref:`determinant<class_Matrix3_determinant>` **(** **)** |
  20. +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  21. | :ref:`Vector3<class_vector3>` | :ref:`get_euler<class_Matrix3_get_euler>` **(** **)** |
  22. +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  23. | :ref:`int<class_int>` | :ref:`get_orthogonal_index<class_Matrix3_get_orthogonal_index>` **(** **)** |
  24. +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  25. | :ref:`Vector3<class_vector3>` | :ref:`get_scale<class_Matrix3_get_scale>` **(** **)** |
  26. +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  27. | :ref:`Matrix3<class_matrix3>` | :ref:`inverse<class_Matrix3_inverse>` **(** **)** |
  28. +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  29. | :ref:`Matrix3<class_matrix3>` | :ref:`orthonormalized<class_Matrix3_orthonormalized>` **(** **)** |
  30. +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  31. | :ref:`Matrix3<class_matrix3>` | :ref:`rotated<class_Matrix3_rotated>` **(** :ref:`Vector3<class_vector3>` axis, :ref:`float<class_float>` phi **)** |
  32. +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  33. | :ref:`Matrix3<class_matrix3>` | :ref:`scaled<class_Matrix3_scaled>` **(** :ref:`Vector3<class_vector3>` scale **)** |
  34. +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  35. | :ref:`float<class_float>` | :ref:`tdotx<class_Matrix3_tdotx>` **(** :ref:`Vector3<class_vector3>` with **)** |
  36. +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  37. | :ref:`float<class_float>` | :ref:`tdoty<class_Matrix3_tdoty>` **(** :ref:`Vector3<class_vector3>` with **)** |
  38. +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  39. | :ref:`float<class_float>` | :ref:`tdotz<class_Matrix3_tdotz>` **(** :ref:`Vector3<class_vector3>` with **)** |
  40. +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  41. | :ref:`Matrix3<class_matrix3>` | :ref:`transposed<class_Matrix3_transposed>` **(** **)** |
  42. +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  43. | :ref:`Vector3<class_vector3>` | :ref:`xform<class_Matrix3_xform>` **(** :ref:`Vector3<class_vector3>` v **)** |
  44. +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  45. | :ref:`Vector3<class_vector3>` | :ref:`xform_inv<class_Matrix3_xform_inv>` **(** :ref:`Vector3<class_vector3>` v **)** |
  46. +--------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  47. Member Variables
  48. ----------------
  49. - :ref:`Vector3<class_vector3>` **x**
  50. - :ref:`Vector3<class_vector3>` **y**
  51. - :ref:`Vector3<class_vector3>` **z**
  52. Description
  53. -----------
  54. 3x3 matrix used for 3D rotation and scale. Contains 3 vector fields x,y and z. Can also be accessed as array of 3D vectors. Almost always used as orthogonal basis for a :ref:`Transform<class_transform>`.
  55. Member Function Description
  56. ---------------------------
  57. .. _class_Matrix3_Matrix3:
  58. - :ref:`Matrix3<class_matrix3>` **Matrix3** **(** :ref:`Quat<class_quat>` from **)**
  59. Create a matrix from a quaternion.
  60. .. _class_Matrix3_Matrix3:
  61. - :ref:`Matrix3<class_matrix3>` **Matrix3** **(** :ref:`Vector3<class_vector3>` axis, :ref:`float<class_float>` phi **)**
  62. Create a matrix from an axis vector and an angle.
  63. .. _class_Matrix3_Matrix3:
  64. - :ref:`Matrix3<class_matrix3>` **Matrix3** **(** :ref:`Vector3<class_vector3>` x_axis, :ref:`Vector3<class_vector3>` y_axis, :ref:`Vector3<class_vector3>` z_axis **)**
  65. Create a matrix from 3 axis vectors.
  66. .. _class_Matrix3_determinant:
  67. - :ref:`float<class_float>` **determinant** **(** **)**
  68. Return the determinant of the matrix.
  69. .. _class_Matrix3_get_euler:
  70. - :ref:`Vector3<class_vector3>` **get_euler** **(** **)**
  71. Return euler angles from the matrix.
  72. .. _class_Matrix3_get_orthogonal_index:
  73. - :ref:`int<class_int>` **get_orthogonal_index** **(** **)**
  74. .. _class_Matrix3_get_scale:
  75. - :ref:`Vector3<class_vector3>` **get_scale** **(** **)**
  76. .. _class_Matrix3_inverse:
  77. - :ref:`Matrix3<class_matrix3>` **inverse** **(** **)**
  78. Return the affine inverse of the matrix.
  79. .. _class_Matrix3_orthonormalized:
  80. - :ref:`Matrix3<class_matrix3>` **orthonormalized** **(** **)**
  81. Return the orthonormalized version of the matrix (useful to call from time to time to avoid rounding error).
  82. .. _class_Matrix3_rotated:
  83. - :ref:`Matrix3<class_matrix3>` **rotated** **(** :ref:`Vector3<class_vector3>` axis, :ref:`float<class_float>` phi **)**
  84. Return the rotated version of the matrix, by a given axis and angle.
  85. .. _class_Matrix3_scaled:
  86. - :ref:`Matrix3<class_matrix3>` **scaled** **(** :ref:`Vector3<class_vector3>` scale **)**
  87. Return the scaled version of the matrix, by a 3D scale.
  88. .. _class_Matrix3_tdotx:
  89. - :ref:`float<class_float>` **tdotx** **(** :ref:`Vector3<class_vector3>` with **)**
  90. Transposed dot product with the x axis of the matrix.
  91. .. _class_Matrix3_tdoty:
  92. - :ref:`float<class_float>` **tdoty** **(** :ref:`Vector3<class_vector3>` with **)**
  93. Transposed dot product with the y axis of the matrix.
  94. .. _class_Matrix3_tdotz:
  95. - :ref:`float<class_float>` **tdotz** **(** :ref:`Vector3<class_vector3>` with **)**
  96. Transposed dot product with the z axis of the matrix.
  97. .. _class_Matrix3_transposed:
  98. - :ref:`Matrix3<class_matrix3>` **transposed** **(** **)**
  99. Return the transposed version of the matrix.
  100. .. _class_Matrix3_xform:
  101. - :ref:`Vector3<class_vector3>` **xform** **(** :ref:`Vector3<class_vector3>` v **)**
  102. Return a vector transformed by the matrix and return it.
  103. .. _class_Matrix3_xform_inv:
  104. - :ref:`Vector3<class_vector3>` **xform_inv** **(** :ref:`Vector3<class_vector3>` v **)**
  105. Return a vector transformed by the transposed matrix and return it.