Mathutils Module -- Blender Game Engine 2.49b


Class index  __

Method index  __

Mathutils index  __

Euler index  __

Matrix index  __

Quaternion index  __

Vector index  __


 




RotationMatrix

RotationMatrix(angle, matSize, axisFlag, axis)

Creates a matrix representing a rotation.

Returns Type:  Matrix

angle  (The angle of rotation desired)
Type:  float)

matSize  (The size of the rotation matrix to construct. Can be 2x2, 3x3, or 4x4)
Type:  Integer

axisFlag
Type:  string
  "x" = x-axis rotation
  "y" = y-axis rotation
  "z" = z-axis rotation"
  "r" =  arbitrary rotation around vector

axis:  (optional -- The arbitrary axis of rotation used with the "R" axisFlag)
Type=Vector

Sample Code

# import Mathutils
import Mathutils

# use RotationMatrix
matrixNew = Mathutils.RotationMatrix(90.0, 3, "x")

 
The Blender Game engine uses the Python programming language to extent the capabilities of the game engine.  The Python programming language is open source and free to use, even for commercial products.  Python is a multi-platform programing language that runs on Windows, Linux/Unix and Mac OS X operating systems.  A general-purpose programming language, Python is a high-level, dynamic, object-oriented language that beginners find easy to learn.