Module Mathutils :: Class Euler
[frames | no frames]

Class Euler


The Euler object

This object gives access to Eulers in Blender.

Attention: Euler 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
Euler object __init__(list)
Create a new euler object.
Matrix object toMatrix()
Return a matrix representation of the euler.
Quaternion object toQuat()
Return a quaternion representation of the euler.
  unique()
Calculate a unique rotation for this euler.
  zero()
Set all values to zero.

Instance Variable Summary
  wrapped: Whether or not this object is wrapping data directly
  x: The heading value in degrees.
  y: The pitch value in degrees.
  z: The roll value in degrees.

Method Details

__init__(list=None)
(Constructor)

Create a new euler object.

Example:
 euler = Euler(45,0,0)
 euler = Euler(myEuler)
 euler = Euler(sequence)
Parameters:
list - 3d list to initialize euler
           (type=PyList of float/int)
Returns:
Euler representing heading, pitch, bank.
           (type=Euler object)

Note: Values are in degrees.

toMatrix()

Return a matrix representation of the euler.
Returns:
A roation matrix representation of the euler.
           (type=Matrix object)

toQuat()

Return a quaternion representation of the euler.
Returns:
Quaternion representation of the euler.
           (type=Quaternion object)

unique()

Calculate a unique rotation for this euler. Avoids gimble lock.
Returns:
a copy of itself

zero()

Set all values to zero.
Returns:
a copy of itself

Instance Variable Details

wrapped

Whether or not this object is wrapping data directly

x

The heading value in degrees.

y

The pitch value in degrees.

z

The roll value in degrees.

Generated by Epydoc 2.1 on Thu Dec 22 22:38:11 2005 http://epydoc.sf.net