Logo Search packages:      
Sourcecode: blender version File versions  Download package

Mathutils::Quaternion Class Reference

List of all members.

Detailed Description

The Quaternion object
  This object gives access to Quaternions in Blender.
@group Axises: x, y, z, w
@ivar w: The w value.
@ivar x: The x value.
@ivar y: The y value.
@ivar z: The z value.
@ivar wrapped: Wether or not this object wraps data directly
@ivar magnitude: The magnitude of the quaternion.
@ivar axis: Vector representing the axis of rotation.
@ivar angle: A scalar representing the amount of rotation
in degrees.
@note: Comparison operators can be done:
    - ==, != test numeric values within epsilon
@note: Math can be performed on Quaternion classes
    - quat + quat
    - quat - quat 
    - quat * float/int
    - quat * vec
    - quat * quat
@note: You can access a quaternion object like a sequence
    - x = quat[0]
@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.
    wrappedObject = Object.getAttribute() #this is wrapped data
    print wrappedObject.wrapped #prints 'True'
    copyOfObject = wrappedObject.copy() #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'

Definition at line 653 of file Mathutils.py.

Public Member Functions

def __init__
def conjugate
def copy
def cross
def dot
def identity
def inverse
def negate
def normalize
def toEuler
def toMatrix

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

Generated by  Doxygen 1.6.0   Back to index