Home | Trees | Index | Help |
|
---|
Module Mathutils |
|
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
Classes | |
---|---|
Euler |
This object gives access to Eulers in Blender. |
Matrix |
This object gives access to Matrices in Blender. |
Quaternion |
This object gives access to Quaternions in Blender. |
Vector |
This object gives access to Vectors in Blender. |
Function Summary | |
---|---|
float |
Return the angle between two vectors. |
Euler object |
Create a new euler object. |
Matrix object. |
Create a copy of the Matrix object. |
Quaternion object. |
Create a copy of the Quaternion object. |
Vector object. |
Create a copy of the Vector object. |
Quaternion object. |
Return the cross product of two quaternions. |
Vector object. |
Return the cross product of two vectors. |
Quaternion object |
Returns a quaternion represting the rotational difference. |
float |
Return the dot product of two quaternions. |
float |
Return the dot product of two vectors. |
Vector object |
Multiply a matrix and a vector (post-multiply) Vector size and matrix row size must equal. |
Vector object |
Return a vector to the midpoint between two vectors. |
Matrix object. |
Create a matrix to represent an orthographic projection |
Vector object |
Return the projection of vec1 onto vec2. |
Return a random number within a range. | |
Roatate a euler by an amount in degrees around an axis. | |
Matrix object. |
Create a matrix representing a rotation. |
Matrix object. |
Create a matrix representing a scaling. |
Matrix object. |
Create a matrix to represent an orthographic projection |
Quaternion object |
Returns the interpolation of two quaternions. |
Matrix object. |
Create a matrix representing a translation |
Vector object |
Multiply a vector and matrix (pre-multiply) Vector size and matrix column size must equal. |
Function Details |
---|
AngleBetweenVecs(vec1, vec2)Return the angle between two vectors.
|
CopyEuler(euler)Create a new euler object.
|
CopyMat(matrix)Create a copy of the Matrix object.
|
CopyQuat(quaternion)Create a copy of the Quaternion object.
|
CopyVec(vector)Create a copy of the Vector object.
|
CrossQuats(quat1, quat2)Return the cross product of two quaternions.
|
CrossVecs(vec1, vec2)Return the cross product of two vectors.
|
DifferenceQuats(quat1, quat2)Returns a quaternion represting the rotational difference.
|
DotQuats(quat1, quat2)Return the dot product of two quaternions.
|
DotVecs(vec1, vec2)Return the dot product of two vectors.
|
MatMultVec(mat, vec)Multiply a matrix and a vector (post-multiply) Vector size and matrix row size must equal.
|
MidpointVecs(vec1, vec2)Return a vector to the midpoint between two vectors.
|
OrthoProjectionMatrix(plane, matSize, axis)Create a matrix to represent an orthographic projection
|
ProjectVecs(vec1, vec2)Return the projection of vec1 onto vec2.
|
Rand(high=1, low=0)Return a random number within a range. High and low represent the range from which the random number must return its result.
|
RotateEuler(euler, angle, axis)Roatate a euler by an amount in degrees around an axis.
|
RotationMatrix(angle, matSize, axisFlag, axis)Create a matrix representing a rotation.
|
ScaleMatrix(factor, matSize, axis)Create a matrix representing a scaling.
|
ShearMatrix(plane, factor, matSize)Create a matrix to represent an orthographic projection
|
Slerp(quat1, quat2, factor)Returns the interpolation of two quaternions.
|
TranslationMatrix(vector)Create a matrix representing a translation
|
VecMultMat(vec, mat)Multiply a vector and matrix (pre-multiply) Vector size and matrix column size must equal.
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.0 on Wed May 12 22:11:00 2004 | http://epydoc.sf.net |