Trees | Indices | Help |
---|
|
The Blender.Mathutils submodule.
This module provides access to matrices, eulers, quaternions and vectors.
Example:
import Blender from Blender import Mathutils from Blender.Mathutils import * vec = Vector([1,2,3]) mat = RotationMatrix(90, 4, 'x') matT = TranslationMatrix(vec) matTotal = mat * matT matTotal.invert() mat3 = matTotal.rotationPart quat1 = mat.toQuat() quat2 = mat3.toQuat() angle = DifferenceQuats(quat1, quat2) print angle
|
|||
Vector This object gives access to Vectors in Blender. |
|||
Euler This object gives access to Eulers in Blender. |
|||
Quaternion This object gives access to Quaternions in Blender. |
|||
Matrix This object gives access to Matrices in Blender. |
|
|||
|
|||
Vector object |
|
||
float |
|
||
float |
|
||
float |
|
||
(Vector object, Vector object) |
|
||
Vector object. |
|
||
Vector object. |
|
||
float |
|
||
float |
|
||
Vector object |
|
||
Vector object |
|
||
Vector object |
|
||
Matrix object. |
|
||
Matrix object. |
|
||
Matrix object. |
|
||
Matrix object. |
|
||
Matrix object. |
|
||
Matrix object. |
|
||
Vector object |
|
||
Quaternion object. |
|
||
Quaternion object. |
|
||
float |
|
||
Quaternion object |
|
||
Quaternion object |
|
||
Euler object |
|
||
|
|
|||
__package__ = None
|
|
Return a random number within a range. low and high represent are optional parameters which represent the range from which the random number must return its result.
|
Return the intersection between a ray and a triangle, if possible, return None otherwise.
|
Return the area size of the 2D or 3D triangle defined.
|
Return the normal of the 3D triangle defined.
|
Return the normal of the 3D quad defined.
|
Return a tuple with the points on each line respectively closest to the other (when both lines intersect, both vector hold the same value). The lines are evaluated as infinite lines in space, the values returned may not be between the 2 points given for each line.
|
Create a copy of the Vector object.
Attention: DEPRECATED use vector.copy() instead. |
Return the cross product of two vectors.
|
Return the dot product of two vectors.
|
Return the angle between two vectors. Zero length vectors raise an error.
|
Return a vector to the midpoint between two vectors.
|
Multiply a vector and matrix (pre-multiply) Vector size and matrix column size must equal.
Attention: DEPRECATED You should now multiply vector * matrix direcly Example: result = myVector * myMatrix |
Return the projection of vec1 onto vec2.
|
Create a matrix representing a rotation.
|
Create a matrix representing a translation
|
Create a matrix representing a scaling.
|
Create a matrix to represent an orthographic projection
|
Create a matrix to represent an orthographic projection
|
Create a copy of the Matrix object.
Attention: DEPRECATED Use the matrix copy funtion to make a copy. Example: newMat = myMat.copy() |
Multiply a matrix and a vector (post-multiply) Vector size and matrix row size must equal.
Attention: DEPRECATED You should use direct muliplication on the arguments Example: result = myMatrix * myVector |
Create a copy of the Quaternion object.
Attention: DEPRECATED You should use the Quaterion() constructor directly to create copies of quaternions Example: newQuat = Quaternion(myQuat) |
Return the cross product of two quaternions.
|
Return the dot product of two quaternions.
|
Returns a quaternion represting the rotational difference.
|
Returns the interpolation of two quaternions.
|
Create a new euler object.
Attention: DEPRECATED You should use the Euler constructor directly to make copies of Euler objects Example: newEuler = Euler(myEuler) |
Roatate a euler by an amount in degrees around an axis.
|
Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Fri Oct 24 10:23:50 2008 | http://epydoc.sourceforge.net |