Basis Methods |
The Basis type exposes the following members.
Name | Description | |
---|---|---|
Determinant |
Returns the determinant of the basis matrix. If the basis is
uniformly scaled, its determinant is the square of the scale.
A negative determinant means the basis has a negative scale.
A zero determinant means the basis isn't invertible,
and is usually considered invalid.
| |
Equals(Object) | (Overrides ValueTypeEquals(Object).) | |
Equals(Basis) | ||
GetAxis | Obsolete.
Deprecated, please use the array operator instead.
| |
GetColumn | Obsolete.
Deprecated, please use the array operator instead.
| |
GetEuler |
Returns the basis's rotation in the form of Euler angles
(in the YXZ convention: when *decomposing*, first Z, then X, and Y last).
The returned vector contains the rotation angles in
the format (X angle, Y angle, Z angle).
Consider using the Quat method instead, which
returns a Quat quaternion instead of Euler angles.
| |
GetHashCode | (Overrides ValueTypeGetHashCode.) | |
GetOrthogonalIndex |
This function considers a discretization of rotations into
24 points on unit sphere, lying along the vectors (x, y, z) with
each component being either -1, 0, or 1, and returns the index
of the point best representing the orientation of the object.
It is mainly used by the GridMap editor.
For further details, refer to the Godot source code.
| |
GetRow |
Get rows by index. Rows are not very useful for user code,
but are more efficient for some internal calculations.
| |
GetType | (Inherited from Object.) | |
Inverse |
Returns the inverse of the matrix.
| |
IsEqualApprox |
Returns true if this basis and `other` are approximately equal, by running
IsEqualApprox(Vector3) on each component.
| |
Orthonormalized |
Returns the orthonormalized version of the basis matrix (useful to
call occasionally to avoid rounding errors for orthogonal matrices).
This performs a Gram-Schmidt orthonormalization on the basis of the matrix.
| |
Quat |
Returns the basis's rotation in the form of a quaternion.
See GetEuler if you need Euler angles, but keep in
mind that quaternions should generally be preferred to Euler angles.
| |
Rotated |
Introduce an additional rotation around the given `axis`
by `phi` (in radians). The axis must be a normalized vector.
| |
RotationQuat | ||
Scaled |
Introduce an additional scaling specified by the given 3D scaling factor.
| |
SetColumn | Obsolete.
Deprecated, please use the array operator instead.
| |
SetRow |
Sets rows by index. Rows are not very useful for user code,
but are more efficient for some internal calculations.
| |
Slerp |
Assuming that the matrix is a proper rotation matrix, slerp performs
a spherical-linear interpolation with another rotation matrix.
| |
Tdotx |
Transposed dot product with the X axis of the matrix.
| |
Tdoty |
Transposed dot product with the Y axis of the matrix.
| |
Tdotz |
Transposed dot product with the Z axis of the matrix.
| |
ToString | (Overrides ValueTypeToString.) | |
ToString(String) | ||
Transposed |
Returns the transposed version of the basis matrix.
| |
Xform |
Returns a vector transformed (multiplied) by the basis matrix.
| |
XformInv |
Returns a vector transformed (multiplied) by the transposed basis matrix.
Note: This results in a multiplication by the inverse of the
basis matrix only if it represents a rotation-reflection.
|