Methods
Quaternion pārstāv vienības kvaterniona, ko izmanto rotācijai. Tas novērš gimbal lock un nodrošina gludu interpolāciju starp orientācijām. The Transform klase saglabā rotāciju kā Quaternion pieejams caur getRotation() / setRotation().
Methods: com.aspose.threed
Methods
| Methods | Methods |
|---|
Quaternion() | Identitātes kvaternions (1, 0, 0, 0) |
Quaternion(double w, double x, double y, double z) | Izveido no četriem komponentiem |
Publiskie lauki
Quaternion izmanto publiskie lauki komponentu piekļuvei (nevis getter/setter metodes):
| Methods | Methods | Methods | Methods |
|---|
w | double | q.w | Skalarā (reālā) daļa |
x | double | q.x | X komponente vektora daļā |
y | double | q.y | Y komponents vektora daļā |
z | double | q.z | Z komponents vektora daļā |
Aprēķinātās īpašības
| Methods | Methods | Methods | Methods |
|---|
length | double | getLength() | Kvaterniona lielums (jābūt 1.0 vienībkvaterniona gadījumā) |
Statiskie lauki
| Methods | Methods | Methods |
|---|
IDENTITY | Quaternion | Identitātes kvaternions (1, 0, 0, 0) – nav rotācijas |
Statiskās metodes
| Methods | Atgriešanas tips | Methods |
|---|
Quaternion.fromEuler(double x, double y, double z) | Quaternion | Izveido kvaterniona no Eilera leņķiem grādos |
Quaternion.fromAngleAxis(double angle, Vector3 axis) | Quaternion | Izveido kvaterniona no leņķa (radiānos) un rotācijas ass |
Instanču metodes
| Methods | Atgriešanas tips | Methods |
|---|
normalize() | Quaternion | Atgriež vienības garuma kopiju |
conjugate() | Quaternion | Atgriež konjugātu (negēto vektora daļu) |
inverse() | Quaternion | Atgriež reizināšanas inversu |
toEulerAngles() | Vector3 | Pārvērš uz Eilera leņķiem grādos |
toMatrix() | Matrix4 | Pārvērš uz 4x4 rotācijas matricu |
Methods
Skatīt arī