Home | Trees | Index | Help |
|
---|
Module Mathutils :: Class Quaternion |
|
Attention: Quaternion data can be wrapped or non-wrapped. When a object is wrapped it means that the object will give you direct access to the data inside of blender. Modification of this object will directly change the data inside of blender. To copy a wrapped object you need to use the object's constructor. If you copy and object by assignment you will not get a second copy but a second reference to the same data. Only certain functions will return wrapped data. This will be indicated in the method description. Example:
wrappedObject = Object.getAttribute() #this is wrapped data print wrappedObject.wrapped #prints 'True' copyOfObject = Object(wrappedObject) #creates a copy of the object secondPointer = wrappedObject #creates a second pointer to the same data print wrappedObject.attribute #prints '5' secondPointer.attribute = 10 print wrappedObject.attribute #prints '10' print copyOfObject.attribute #prints '5'
Notes:
Method Summary | |
---|---|
New quaternion object. |
Create a new quaternion object from initialized values. |
Set the quaternion to its conjugate. | |
Set the quaternion to the identity quaternion. | |
Set the quaternion to its inverse | |
Set the quaternion to its negative. | |
Normalize the quaternion. | |
Euler object |
Return Euler representation of the quaternion. |
Matrix object |
Return a matrix representation of the quaternion. |
Instance Variable Summary | |
---|---|
angle : A scalar representing the amount of rotation in degrees. | |
axis : Vector representing the axis of rotation. | |
magnitude : The magnitude of the quaternion. | |
w : The w value. | |
wrapped : Wether or not this object wraps data directly | |
x : The x value. | |
y : The y value. | |
z : The z value. |
Method Details |
---|
__init__(list,
angle=None)
|
conjugate()Set the quaternion to its conjugate.
|
identity()Set the quaternion to the identity quaternion.
|
inverse()Set the quaternion to its inverse
|
negate()Set the quaternion to its negative.
|
normalize()Normalize the quaternion.
|
toEuler()Return Euler representation of the quaternion.
|
toMatrix()Return a matrix representation of the quaternion.
|
Instance Variable Details |
---|
angleA scalar representing the amount of rotation in degrees. |
axisVector representing the axis of rotation. |
magnitudeThe magnitude of the quaternion. |
wThe w value. |
wrappedWether or not this object wraps data directly |
xThe x value. |
yThe y value. |
zThe z value. |
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Thu Dec 22 22:38:14 2005 | http://epydoc.sf.net |