SetFromQuaternion sets this vector components to the Euler angles from the specified quaternion Returns the pointer to this updated vector.
(q *Quaternion)
| 632 | // from the specified quaternion |
| 633 | // Returns the pointer to this updated vector. |
| 634 | func (v *Vector3) SetFromQuaternion(q *Quaternion) *Vector3 { |
| 635 | |
| 636 | matrix := NewMatrix4() |
| 637 | matrix.MakeRotationFromQuaternion(q) |
| 638 | v.SetFromRotationMatrix(matrix) |
| 639 | return v |
| 640 | } |
| 641 | |
| 642 | // RandomTangents computes and returns two arbitrary tangents to the vector. |
| 643 | func (v *Vector3) RandomTangents() (*Vector3, *Vector3) { |
no test coverage detected