Class for quaternions.
More...
|
def | __init__ (self, arg=None) |
| Construct a Quat object. More...
|
|
def | conv_from (self, src) |
| Converts src to a quaternion.
|
|
def | to_quat (self, h) |
| Converts (copy) to a quaternion.
|
|
def | to_rotmat (self, r) |
| Converts to a rotation matrix and store in.
|
|
def | to_axang (self, a) |
| Converts to an axis-angle and store in a.
|
|
def | to_eulerzyx (self) |
| Converts to an euler zyx angle representation.
|
|
def | vector (self) |
| Returns the vector (xyz) part.
|
|
def | scalar (self) |
| Returns the scalar (w) part.
|
|
def | ssd (self, other) |
| Sum-square-differences of self and other.
|
|
def | nrm2 (self) |
| 2-norm (Euclidean) of self.
|
|
def | __iadd__ (self, other) |
|
def | __isub__ (self, other) |
|
def | __add__ (self, other) |
|
def | __radd__ (self, other) |
|
def | __sub__ (self, other) |
|
def | __rsub__ (self, other) |
|
def | normalize (self) |
| Normalize this object, i.e., divide by the magnitude.
|
|
def | minimize (self) |
| Converts to the minimal quaternion for the represented rotation.
|
|
def | set_identity (self) |
| Set to identity.
|
|
def | zero (self) |
| Set to zero.
|
|
def | __imul__ (self, other) |
|
def | __rmul__ (self, other) |
|
def | __mul__ (self, other) |
|
def | __getitem__ (self, key) |
|
def | __setitem__ (self, key, item) |
|
def | __len__ (self) |
|
def | conj (self) |
| Returns the conjugate.
|
|
def | __invert__ (self) |
| Returns the inverse.
|
|
def | exp (self) |
| Returns the exponential.
|
|
def | ln (self) |
| Returns the natural logarithm.
|
|
def | rotate (self, p) |
| Rotate a point by this quaternion.
|
|
def | __repr__ (self) |
|
def | copy_from (self, src) |
| Copy elements from src to self.
|
|
def | copy_to (self, dst) |
| Copy elements from self to dst.
|
|
def | __eq__ (self, other) |
|
def | __ne__ (self, other) |
|
def | isclose (self, other, rel_tol=1e-09, abs_tol=0.0) |
| Returns true if object is close to other.
|
|
def | __div__ (self, other) |
|
def | __idiv__ (self, other) |
| Divide self by a scala.
|
|
Class for quaternions.
Definition at line 468 of file tf.py.
◆ __init__()
def amino.tf.Quat.__init__ |
( |
|
self, |
|
|
|
arg = None |
|
) |
| |
Construct a Quat object.
* If arg is None, the object is unitialized.
* If arg is a list, the list elements are copied to the object.
* If arg is an int or float, the scalar (w) of the object is set
and the vector (xyz) is zero
* If arg is a Vec3, the vector (xyz) of the object is set
and the scalar (w) is zero
* Else arg is converted to a Quat
Definition at line 489 of file tf.py.
◆ ensure()
def amino.tf.Quat.ensure |
( |
|
thing | ) |
|
|
static |
Ensures thing is a Quat.
If it's not, convert it.
Definition at line 515 of file tf.py.
The documentation for this class was generated from the following file:
- /home/ntd/git/amino/python/amino/tf.py