Properties
Matrix4 ir 4x4 dubultprecizitātes matrica, ko izmanto afinām transformācijām 3D telpā. To atgriež Transform.getTransformMatrix() un GlobalTransform.getTransformMatrix(), un to var izveidot no pārvietošanas, rotācijas un mēroga (TRS) dekompozīcijām.
Properties: com.aspose.threed
Properties
| Properties | Properties |
|---|
Matrix4() | Izveido vienības matricu |
Matrix4(double m00, double m01, ... double m33) | Izveido no 16 atsevišķiem elementiem (rindas secībā) |
Statiskie lauki
| Properties | Properties | Properties |
|---|
IDENTITY | Matrix4 | 4x4 vienības matrica |
Publiskie lauki (Elementu piekļuve)
Matrix4 izmanto publiskus laukus elementa piekļuvei: m00, m01, … m33 (kopā 16 lauki, rindas galvenā kārtība).
| Lauka paraugs | Properties | Properties |
|---|
m00 … m33 | double | Individuāli matricas elementi kā publiski lauki. Piekļūst kā mat.m00, mat.m01, utt. |
Pārvietošanas komponentes ir pēdējā kolonnā: m03 (X), m13 (Y), m23 (Z).
Properties
| Properties | Atgriešanas tips | Properties |
|---|
multiply(Matrix4 other) | Matrix4 | Matricas reizināšana; atgriež jaunu matricu |
inverse() | Matrix4 | Atgriež inverso matricu |
transpose() | Matrix4 | Atgriež transponētu matricu |
decompose(Vector3 translation, Vector3 scaling, Quaternion rotation) | boolean | Stub: vienmēr atgriež false. Domāts, lai sadalītu matricu TRS komponentēs, bet vēl nav īstenots. |
determinant() | double | Atgriež matricas determinantu |
transformPoint(Vector3 point) | Vector3 | Transformē punktu (pielieto pilnu translation + rotation + scale) |
transformDirection(Vector3 direction) | Vector3 | Transformē virziena vektoru (pielieto rotation + scale, ignorē translation) |
Statiskās metodes
| Properties | Atgriešanas tips | Properties |
|---|
Matrix4.translate(Vector3 t) | Matrix4 | Izveido pārvietošanas matricu |
Matrix4.translate(double x, double y, double z) | Matrix4 | Izveido pārvietošanas matricu no komponentēm |
Matrix4.scale(Vector3 s) | Matrix4 | Izveido skalēšanas matricu |
Matrix4.scale(double x, double y, double z) | Matrix4 | Izveido skalēšanas matricu no komponentēm |
Matrix4.rotateFromQuaternion(Quaternion q) | Matrix4 | Izveido rotācijas matricu no kvaterniona |
Properties
Skatīt arī