Uranium
Application Framework
|
Public Member Functions | |
None | __init__ (self, float x=0.0, float y=0.0, float z=0.0, float w=1.0) |
def | getData (self) |
def | x (self) |
def | y (self) |
def | z (self) |
def | w (self) |
None | setByAngleAxis (self, float angle, Vector axis) |
def | __mul__ (self, other) |
def | __imul__ (self, other) |
def | __add__ (self, other) |
def | __iadd__ (self, other) |
def | __truediv__ (self, other) |
def | __itruediv__ (self, other) |
def | __eq__ (self, other) |
def | __neg__ (self) |
"Quaternion" | getInverse (self) |
"Quaternion" | invert (self) |
def | rotate (self, vector) |
def | dot (self, other) |
float | length (self) |
None | normalize (self) |
None | setByMatrix (self, Matrix matrix, bool ensure_unit_length=False) |
Matrix | toMatrix (self) |
def | __repr__ (self) |
def | __str__ (self) |
Static Public Member Functions | |
def | slerp (start, end, amount) |
def | rotationTo (v1, v2) |
"Quaternion" | fromMatrix (Matrix matrix) |
"Quaternion" | fromAngleAxis (float angle, Vector axis) |
Static Public Attributes | |
float | EPS = numpy.finfo(float).eps * 4.0 |
Unit Quaternion class based on numpy arrays. This class represents a Unit quaternion that can be used for rotations. :note The operations that modify this quaternion will ensure the length of the quaternion remains 1. This is done to make this class simpler to use.
|
static |
Returns a quaternion representing the rotation from vector 1 to vector 2. :param v1: :type{Vector} The vector to rotate from. :param v2: :type{Vector} The vector to rotate to.
None UM.Math.Quaternion.Quaternion.setByAngleAxis | ( | self, | |
float | angle, | ||
Vector | axis | ||
) |
Set quaternion by providing rotation about an axis. :param angle: :type{float} Angle in radians :param axis: :type{Vector} Axis of rotation
None UM.Math.Quaternion.Quaternion.setByMatrix | ( | self, | |
Matrix | matrix, | ||
bool | ensure_unit_length = False |
||
) |
Set quaternion by providing a homogeneous (4x4) rotation matrix. :param matrix: 4x4 Matrix object :param ensure_unit_length: