CVBpy 15.0
Matrix2D Class Reference

Double precision 2x2 matrix class. More...

Inherits object.

Public Member Functions

cvb.Matrix2D create ()
 Construct a 2x2 matrix. More...
 
cvb.Matrix2D create (float a11, float a12, float a21, float a22)
 
cvb.Matrix2D create (cvb.Angle rotation, float scale)
 Construct a 2x2 matrix. More...
 
cvb.Matrix2D create (float scale)
 Construct a 2x2 matrix. More...
 
cvb.Matrix2D create (float scale_x, float scale_y)
 Construct a 2x2 matrix. More...
 
cvb.Matrix2D create (cvb.Point2D column1, cvb.Point2D column2)
 Construct a 2x2 matrix. More...
 
cvb.Matrix2D create (List[float] values)
 Construct a 2x2 matrix. More...
 
cvb.Matrix2D identity ()
 The identity element. More...
 
None inverse (self)
 Gets the inverse of this matrix if possible. More...
 
None invert (self)
 Inverts this matrix in-place if possible. More...
 

Properties

 a11 = property
 float: Gets or sets top left matrix element.
 
 a12 = property
 float: Gets or sets top right matrix element.
 
 a21 = property
 float: Gets or sets bottom left matrix element.
 
 a22 = property
 float: Gets or sets bottom right matrix element.
 
 det = property
 float: Matrix determinant.
 

Detailed Description

Double precision 2x2 matrix class.

Supports the same arguments as cvb.Matrix2D.create.

Parameters

*args : Any Parameters like cvb.Matrix2D.create.

**kwargs : Any Parameters like cvb.Matrix2D.create.

Member Function Documentation

◆ create() [1/7]

cvb.Matrix2D create ( )

Construct a 2x2 matrix.

Returns

cvb.Matrix2D A 2D matrix

◆ create() [2/7]

cvb.Matrix2D create ( cvb.Angle  rotation,
float  scale 
)

Construct a 2x2 matrix.

Parameters

rotation : cvb.Angle Rotation angle to create the matrix for.

scale : float Scale factor to create the matrix for

Returns

cvb.Matrix2D A 2D matrix

◆ create() [3/7]

cvb.Matrix2D create ( cvb.Point2D  column1,
cvb.Point2D  column2 
)

Construct a 2x2 matrix.

Parameters

column1 : cvb.Point2D Column vector one.

column2 : cvb.Point2D Columns vector two.

Returns

cvb.Matrix2D A 2D matrix

◆ create() [4/7]

cvb.Matrix2D create ( float  a11,
float  a12,
float  a21,
float  a22 
)

Parameters

a11 : float Top left matrix element.

a12 : float Top right matrix element.

a21 : float Bottom left matrix element.

a22 : float Bottom right matrix element.

Returns

cvb.Matrix2D A 2D matrix

◆ create() [5/7]

cvb.Matrix2D create ( float  scale)

Construct a 2x2 matrix.

Parameters

scale : float Scale factor to create the matrix for

Returns

cvb.Matrix2D A 2D matrix

◆ create() [6/7]

cvb.Matrix2D create ( float  scale_x,
float  scale_y 
)

Construct a 2x2 matrix.

Parameters

scale_x : float Scale factor in X direction to create the matrix.

scale_y : float Scale factor in Y direction to create the matrix.

Returns

cvb.Matrix2D A 2D matrix

◆ create() [7/7]

cvb.Matrix2D create ( List[float]  values)

Construct a 2x2 matrix.

Parameters

values : List[float] A list containing exactly 4 elements,

Returns

cvb.Matrix2D A 2D matrix.

◆ identity()

cvb.Matrix2D identity ( )

The identity element.

Returns

cvb.Matrix2D An identity matrix.

◆ inverse()

None inverse (   self)

Gets the inverse of this matrix if possible.

Might cause division by zero.

◆ invert()

None invert (   self)

Inverts this matrix in-place if possible.

Might cause division by zero.