Package esys :: Package lsm :: Package util :: Module FoundationPy :: Class Quaternion
[hide private]
[frames] | no frames]

Class Quaternion

 object --+    
          |    
??.instance --+
              |
             Quaternion

A quaternion.

Instance Methods [hide private]
 
__eq__(...)
 
__getinitargs__(...)
 
__getitem__(...)
 
__init__(...)
Constructs quaternion with specifed component values.
 
__len__(...)
 
__reduce__(...)
helper for pickle
 
__setitem__(...)
 
__str__(...)
str(x)
Vec3
asAngleAxis(...)
Returns angle and axis rotation representation, where angle is the magnitude of the returned Vec3 object.
(float, Vec3)
asAngleAxisPair(...)
Returns angle and axis rotation representation as a two element tuple, the first element is the angle and the second element is the Vec3 axis.
 
normalise(...)
Normalises this quaternion.
 
normalize(...)
Normalizes this quaternion.
list of four floats
toList(...)
Returns a python list of 4 elements.
tuple of four floats
toTuple(...)
Returns a python tuple of 4 elements.

Inherited from unreachable.instance: __new__

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Class Variables [hide private]
  __instance_size__ = 48
  __safe_for_unpickling__ = True
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(...)
(Constructor)

 

Constructs quaternion with specifed component values.

Parameters:
  • q0 (float) - Scalar part, index 0.
  • q1 (float) - index 1
  • q2 (float) - index 2
  • q3 (float) - index 3
Overrides: object.__init__

__reduce__(...)

 

helper for pickle

Overrides: object.__reduce__
(inherited documentation)

__str__(...)
(Informal representation operator)

 

str(x)

Overrides: object.__str__
(inherited documentation)

asAngleAxis(...)

 

Returns angle and axis rotation representation, where angle is the magnitude of the returned Vec3 object.

Returns: Vec3
angle and axis rotation representation.

asAngleAxisPair(...)

 

Returns angle and axis rotation representation as a two element tuple, the first element is the angle and the second element is the Vec3 axis.

Returns: (float, Vec3)
angle and axis rotation tuple-pair.

toList(...)

 

Returns a python list of 4 elements.

Returns: list of four floats
[self[0],self[1],self[2],self[3]]

toTuple(...)

 

Returns a python tuple of 4 elements.

Returns: tuple of four floats
(self[0],self[1],self[2],self[3])