Unity 6.3
0 онлайн 65 гостей 3 в системе
Вход

Matrix4x4.determinant

Declaration

public float determinant;

Описание

Детерминант матрицы. (только для чтения)

Нельзя инвертировать матрицы с детерминантой 0.

using UnityEngine;

public class ExampleScript : MonoBehaviour { void Update() { // create a transformation matrix with scale, zero position and no rotation var scale = new Vector3(5,3,2); var matrix = Matrix4x4.TRS(Vector3.zero, Quaternion.identity, scale);

// determinant of a scaled matrix is volume of the parallelepiped // formed from its axes, in this case 5*3*2=30 Debug.Log(matrix.determinant); } }

Зеркало Детерминант в Википедии для больше деталей.

Дополнительные ресурсы: inverse свойство, Inverse3DAffine метод.