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

Class Euler

source code

The Euler object

This object gives access to Eulers in Blender.


Notes:

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 = 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'

Instance Methods [hide private]
Euler object
__init__(list=None)
Create a new euler object.
source code
 
zero()
Set all values to zero.
source code
 
copy()
Returns: a copy of this euler.
source code
 
unique()
Calculate a unique rotation for this euler.
source code
Matrix object
toMatrix()
Return a matrix representation of the euler.
source code
Quaternion object
toQuat()
Return a quaternion representation of the euler.
source code
Euler object
makeCompatible(eul_compat)
Make this euler compatible with another, so interpolating between them works as expected.
source code
Instance Variables [hide private]
  wrapped
Whether or not this object is wrapping data directly
    Axises
  x
The heading value in degrees.
  y
The pitch value in degrees.
  z
The roll value in degrees.
Method Details [hide private]

__init__(list=None)
(Constructor)

source code 

Create a new euler object.

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

Note: Values are in degrees.

zero()

source code 
Set all values to zero.
Returns:
an instance of itself

copy()

source code 
Returns:
a copy of this euler.

unique()

source code 
Calculate a unique rotation for this euler. Avoids gimble lock.
Returns:
an instance of itself

toMatrix()

source code 
Return a matrix representation of the euler.
Returns: Matrix object
A 3x3 roation matrix representation of the euler.

toQuat()

source code 
Return a quaternion representation of the euler.
Returns: Quaternion object
Quaternion representation of the euler.

makeCompatible(eul_compat)

source code 
Make this euler compatible with another, so interpolating between them works as expected.
Returns: Euler object
an instance of itself