Module Expr Str ImportFrom alias ImportFrom alias Import alias identifier ImportFrom alias ImportFrom alias alias alias alias alias alias ImportFrom alias ClassDef bases NameLoad body Assign NameStore NameLoad Assign NameStore TupleLoad Num Num Assign NameStore Call NameLoad Num Assign NameStore Call NameLoad Num Assign NameStore Call NameLoad Num Assign NameStore Call NameLoad Num Assign NameStore Call NameLoad TupleLoad Num Num Assign NameStore Call NameLoad TupleLoad Num Num Assign NameStore Call NameLoad TupleLoad Num Num Assign NameStore Call NameLoad TupleLoad Num Num Assign NameStore Call NameLoad TupleLoad Num Num Assign NameStore Call NameLoad TupleLoad Num Num Assign NameStore Call NameLoad TupleLoad Num Num Assign NameStore Call NameLoad TupleLoad Num Num Assign NameStore Call NameLoad TupleLoad Num Num Assign NameStore Call NameLoad TupleLoad Num Num Assign NameStore Call NameLoad TupleLoad Num Num Assign NameStore Call NameLoad TupleLoad Num Num Assign NameStore Call NameLoad TupleLoad Num Num Assign NameStore Call NameLoad TupleLoad Num Num Assign NameStore Call NameLoad TupleLoad Num Num Assign NameStore Call NameLoad TupleLoad Num Num Assign NameStore Call NameLoad Num Assign NameStore Call NameLoad Num Assign NameStore Call NameLoad Num Assign NameStore Call NameLoad Num Assign NameStore Call NameLoad TupleLoad Call NameLoad Num Num Num Assign NameStore Call NameLoad TupleLoad Call NameLoad Num Num Num Assign NameStore Call NameLoad TupleLoad Call NameLoad Num Num Num Assign NameStore Call NameLoad TupleLoad Call NameLoad Num Num Num FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Return Call NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str Return Call NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str Return Call NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str Return Call NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Return Call NameLoad Call AttributeLoad NameLoad attr NameLoad keyword NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body If CompareIsNot NameLoad NameLoad body Assign NameStore NameLoad If UnaryOpNot Call NameLoad NameLoad AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad If BoolOpOr CompareEq AttributeLoad NameLoad attr TupleLoad Num Num Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad orelse If BoolOpOr CompareEq AttributeLoad NameLoad attr TupleLoad Num Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad orelse Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr Str NameLoad decorator_list Call NameLoad NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr Str NameLoad decorator_list Call NameLoad NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr Str NameLoad decorator_list Call NameLoad NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr Str NameLoad decorator_list Call NameLoad NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr Str NameLoad decorator_list Call NameLoad NameLoad FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call NameLoad Call AttributeLoad Call NameLoad NameLoad NameLoad attr Call NameLoad NameLoad decorator_list Call NameLoad TupleLoad NameLoad AttributeLoad NameLoad attr NameLoad FunctionDef arguments args NameParam NameParam defaults body Return Call NameLoad Call AttributeLoad Call NameLoad NameLoad NameLoad attr Call NameLoad NameLoad decorator_list Call NameLoad TupleLoad NameLoad AttributeLoad NameLoad attr NameLoad FunctionDef arguments args NameParam NameParam defaults body Return Call NameLoad Call AttributeLoad NameLoad attr NameLoad Call NameLoad NameLoad decorator_list Call NameLoad TupleLoad NameLoad AttributeLoad NameLoad attr NameLoad FunctionDef arguments args NameParam NameParam defaults body Assign NameStore AttributeLoad NameLoad attr Return BinOpMult NameLoad NameLoad decorator_list Call NameLoad NameLoad FunctionDef arguments args NameParam NameParam defaults body Return Call Call NameLoad NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list Call NameLoad NameLoad FunctionDef arguments args NameParam NameParam defaults body Return Call NameLoad Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad decorator_list Call NameLoad TupleLoad NameLoad AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam defaults body Return Call NameLoad Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad decorator_list Call NameLoad TupleLoad NameLoad AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam defaults body Return Call NameLoad Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad decorator_list Call NameLoad TupleLoad NameLoad AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam defaults body Return Call NameLoad Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad decorator_list Call NameLoad TupleLoad NameLoad AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam defaults body Return Call NameLoad Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad decorator_list Call NameLoad TupleLoad NameLoad AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Expr Str Return Call NameLoad NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Return Call NameLoad NameLoad decorator_list NameLoad decorator_list ImportFrom alias ImportFrom alias
N/A N/A Represents a 4x4 Matrix.

The Matrix44 class provides a number of convenient functions and
conversions.
::

    import numpy as np
    from pyrr import Quaternion, Matrix33, Matrix44, Vector4

    m = Matrix44()
    m = Matrix44([[1.,0.,0.,0.],[0.,1.,0.,0.],[0.,0.,1.,0.],[0.,0.,0.,1.]])

    # copy constructor
    m = Matrix44(Matrix44())

    # explicit creation
    m = Matrix44.identity()
    m = Matrix44.from_matrix44(Matrix44())

    # inferred conversions
    m = Matrix44(Quaternion())
    m = Matrix44(Matrix33())

    # multiply matricies together
    m = Matrix44() * Matrix44()

    # extract a quaternion from a matrix
    q = m.quaternion

    # convert from quaternion back to matrix
    m = q.matrix44
    m = Matrix44(q)

    # rotate a matrix by a quaternion
    m = Matrix44.identity() * Quaternion()

    # rotate a vector 4 by a matrix
    v = Matrix44.from_x_rotation(np.pi) * Vector4([1.,2.,3.,1.])

    # undo a rotation
    m = Matrix44.from_x_rotation(np.pi)
    v = m * Vector4([1.,1.,1.,1.])
    # ~m is the same as m.inverse
    v = ~m * v

    # access specific parts of the matrix
    # first row
    m1 = m.m1
    # first element, first row
    m11 = m.m11
    # fourth element, fourth row
    m44 = m.m44
    # first row, same as m1
    r1 = m.r1
    # first column
    c1 = m.c1
 __future__ absolute_import numbers Number N/A numpy np multipledispatch dispatch base BaseObject BaseMatrix BaseMatrix44 BaseQuaternion BaseVector NpProxy N/A matrix44 Matrix44 N/A BaseMatrix44 N/A N/A _module matrix44 N/A _shape N/A 4 4 N/A m1 N/A NpProxy 0 N/A m2 N/A NpProxy 1 N/A m3 N/A NpProxy 2 N/A m4 N/A NpProxy 3 N/A m11 N/A NpProxy N/A 0 0 N/A m12 N/A NpProxy N/A 0 1 N/A m13 N/A NpProxy N/A 0 2 N/A m14 N/A NpProxy N/A 0 3 N/A m21 N/A NpProxy N/A 1 0 N/A m22 N/A NpProxy N/A 1 1 N/A m23 N/A NpProxy N/A 1 2 N/A m24 N/A NpProxy N/A 1 3 N/A m31 N/A NpProxy N/A 2 0 N/A m32 N/A NpProxy N/A 2 1 N/A m33 N/A NpProxy N/A 2 2 N/A m34 N/A NpProxy N/A 2 3 N/A m41 N/A NpProxy N/A 3 0 N/A m42 N/A NpProxy N/A 3 1 N/A m43 N/A NpProxy N/A 3 2 N/A m44 N/A NpProxy N/A 3 3 N/A r1 N/A NpProxy 0 N/A r2 N/A NpProxy 1 N/A r3 N/A NpProxy 2 N/A r4 N/A NpProxy 3 N/A c1 N/A NpProxy N/A N/A slice 0 4 0 N/A c2 N/A NpProxy N/A N/A slice 0 4 1 N/A c3 N/A NpProxy N/A N/A slice 0 4 2 N/A c4 N/A NpProxy N/A N/A slice 0 4 3 from_matrix33 N/A N/A cls matrix dtype N/A None N/A N/A Creates a Matrix44 from a Matrix33.
         N/A N/A cls N/A N/A matrix44 create_from_matrix33 matrix dtype N/A classmethod perspective_projection N/A N/A cls fovy aspect near far dtype N/A None N/A N/A Creates a Matrix44 for use as a perspective projection matrix.
         N/A N/A cls N/A N/A matrix44 create_perspective_projection_matrix fovy aspect near far dtype N/A classmethod perspective_projection_bounds N/A N/A cls left right top bottom near far dtype N/A None N/A N/A Creates a Matrix44 for use as a perspective projection matrix.
         N/A N/A cls N/A N/A matrix44 create_perspective_projection_matrix_from_bounds left right top bottom near far dtype N/A classmethod orthogonal_projection N/A N/A cls left right top bottom near far dtype N/A None N/A N/A Creates a Matrix44 for use as an orthogonal projection matrix.
         N/A N/A cls N/A N/A matrix44 create_orthogonal_projection_matrix left right top bottom near far dtype N/A classmethod from_translation N/A N/A cls translation dtype N/A None N/A N/A Creates a Matrix44 from the specified translation.
         N/A N/A cls N/A N/A matrix44 create_from_translation translation dtype dtype N/A classmethod __new__ N/A N/A cls value dtype N/A None None N/A N/A N/A value None N/A N/A obj value N/A N/A N/A isinstance value N/A np ndarray N/A N/A obj N/A N/A np array value dtype dtype N/A N/A N/A N/A obj shape N/A 3 3 N/A isinstance obj Matrix33 N/A N/A obj N/A N/A matrix44 create_from_matrix33 obj dtype dtype N/A N/A N/A N/A N/A obj shape N/A 4 N/A isinstance obj Quaternion N/A N/A obj N/A N/A matrix44 create_from_quaternion obj dtype dtype N/A N/A obj N/A N/A np zeros N/A cls _shape dtype dtype N/A obj N/A N/A obj view cls N/A N/A N/A N/A super Matrix44 cls __new__ cls obj N/A __add__ N/A N/A self other N/A N/A N/A N/A N/A self _unsupported_type add other N/A N/A dispatch BaseObject __sub__ N/A N/A self other N/A N/A N/A N/A N/A self _unsupported_type subtract other N/A N/A dispatch BaseObject __mul__ N/A N/A self other N/A N/A N/A N/A N/A self _unsupported_type multiply other N/A N/A dispatch BaseObject __truediv__ N/A N/A self other N/A N/A N/A N/A N/A self _unsupported_type divide other N/A N/A dispatch BaseObject __div__ N/A N/A self other N/A N/A N/A N/A N/A self _unsupported_type divide other N/A N/A dispatch BaseObject __invert__ N/A N/A self N/A N/A N/A N/A self inverse N/A __add__ N/A N/A self other N/A N/A N/A N/A Matrix44 N/A N/A N/A super Matrix44 self __add__ N/A Matrix44 other N/A N/A dispatch N/A BaseMatrix N/A np ndarray list __sub__ N/A N/A self other N/A N/A N/A N/A Matrix44 N/A N/A N/A super Matrix44 self __sub__ N/A Matrix44 other N/A N/A dispatch N/A BaseMatrix N/A np ndarray list __mul__ N/A N/A self other N/A N/A N/A N/A Matrix44 N/A N/A matrix44 multiply self N/A Matrix44 other N/A N/A dispatch N/A BaseMatrix N/A np ndarray list __mul__ N/A N/A self other N/A N/A N/A m N/A other matrix44 N/A N/A self m N/A N/A dispatch BaseQuaternion __mul__ N/A N/A self other N/A N/A N/A N/A N/A type other N/A N/A matrix44 apply_to_vector self other N/A N/A dispatch BaseVector __add__ N/A N/A self other N/A N/A N/A N/A Matrix44 N/A N/A N/A super Matrix44 self __add__ other N/A N/A dispatch N/A Number N/A np number __sub__ N/A N/A self other N/A N/A N/A N/A Matrix44 N/A N/A N/A super Matrix44 self __sub__ other N/A N/A dispatch N/A Number N/A np number __mul__ N/A N/A self other N/A N/A N/A N/A Matrix44 N/A N/A N/A super Matrix44 self __mul__ other N/A N/A dispatch N/A Number N/A np number __truediv__ N/A N/A self other N/A N/A N/A N/A Matrix44 N/A N/A N/A super Matrix44 self __truediv__ other N/A N/A dispatch N/A Number N/A np number __div__ N/A N/A self other N/A N/A N/A N/A Matrix44 N/A N/A N/A super Matrix44 self __div__ other N/A N/A dispatch N/A Number N/A np number matrix33 N/A N/A self N/A N/A N/A Returns a Matrix33 representing this matrix.
         N/A N/A Matrix33 self N/A property matrix44 N/A N/A self N/A N/A N/A Returns the Matrix44.

        This can be handy if you're not sure what type of Matrix class you have
        but require a Matrix44.
         N/A self N/A property quaternion N/A N/A self N/A N/A N/A Returns a Quaternion representing this matrix.
         N/A N/A Quaternion self N/A property N/A matrix33 Matrix33 quaternion Quaternion