Uranium
Application Framework
 All Classes Namespaces Files Functions Variables Pages
UM.Math.Quaternion.Quaternion Class Reference

Unit Quaternion class based on numpy arrays. More...

Inherits object.

Public Member Functions

def __init__
 
def getData
 
def x
 
def y
 
def z
 
def w
 
def setByAngleAxis
 Set quaternion by providing rotation about an axis. More...
 
def __mul__
 
def __imul__
 
def __add__
 
def __iadd__
 
def __truediv__
 
def __itruediv__
 
def __eq__
 
def __neg__
 
def getInverse
 
def invert
 
def rotate
 
def dot
 
def length
 
def normalize
 
def setByMatrix
 Set quaternion by providing a homogenous (4x4) rotation matrix. More...
 
def toMatrix
 
def __repr__
 

Static Public Member Functions

def slerp
 
def rotationTo
 Returns a quaternion representing the rotation from vector 1 to vector 2. More...
 
def fromMatrix
 
def fromAngleAxis
 

Static Public Attributes

tuple EPS = numpy.finfo(float)
 

Detailed Description

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.

Member Function Documentation

def UM.Math.Quaternion.Quaternion.rotationTo (   v1,
  v2 
)
static

Returns a quaternion representing the rotation from vector 1 to vector 2.

Parameters
v1Vector The vector to rotate from.
v2Vector The vector to rotate to.
def UM.Math.Quaternion.Quaternion.setByAngleAxis (   self,
  angle,
  axis 
)

Set quaternion by providing rotation about an axis.

Parameters
anglefloat Angle in radians
axisVector Axis of rotation
def UM.Math.Quaternion.Quaternion.setByMatrix (   self,
  matrix,
  is_precise = False 
)

Set quaternion by providing a homogenous (4x4) rotation matrix.

Parameters
matrix4x4 Matrix object
is_precise

The documentation for this class was generated from the following file: