Show / Hide Table of Contents

Struct Matrix2x3d

Represents a 2x3 matrix.

Implements
IEquatable<Matrix2x3d>
Inherited Members
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetType()
Namespace: OpenTK
Assembly: OpenTK.dll
Syntax
public struct Matrix2x3d : IEquatable<Matrix2x3d>

Constructors

Matrix2x3d(Vector3d, Vector3d)

Constructs a new instance.

Declaration
public Matrix2x3d(Vector3d row0, Vector3d row1)
Parameters
Type Name Description
Vector3d row0

Top row of the matrix.

Vector3d row1

Bottom row of the matrix.

Matrix2x3d(Double, Double, Double, Double, Double, Double)

Constructs a new instance

Declaration
public Matrix2x3d(double m00, double m01, double m02, double m10, double m11, double m12)
Parameters
Type Name Description
Double m00

First item of the first row of the matrix.

Double m01

Second item of the first row of the matrix.

Double m02

Third item of the first row of the matrix.

Double m10

First item of the second row of the matrix.

Double m11

Second item of the second row of the matrix.

Double m12

Third item of the second row of the matrix.

Fields

Row0

Top row of the matrix.

Declaration
public Vector3d Row0
Field Value
Type Description
Vector3d

Row1

Bottom row of the matrix.

Declaration
public Vector3d Row1
Field Value
Type Description
Vector3d

Zero

The zero matrix.

Declaration
public static readonly Matrix2x3d Zero
Field Value
Type Description
Matrix2x3d

Properties

Column0

Gets or sets the first column of this matrix.

Declaration
public Vector2d Column0 { get; set; }
Property Value
Type Description
Vector2d

Column1

Gets or sets the second column of this matrix.

Declaration
public Vector2d Column1 { get; set; }
Property Value
Type Description
Vector2d

Column2

Gets or sets the third column of this matrix.

Declaration
public Vector2d Column2 { get; set; }
Property Value
Type Description
Vector2d

Diagonal

Gets or sets the values along the main diagonal of the matrix.

Declaration
public Vector2d Diagonal { get; set; }
Property Value
Type Description
Vector2d

Item[Int32, Int32]

Gets or sets the value at a specified row and column.

Declaration
public double this[int rowIndex, int columnIndex] { get; set; }
Parameters
Type Name Description
Int32 rowIndex
Int32 columnIndex
Property Value
Type Description
Double

M11

Gets or sets the value at row 1, column 1 of this instance.

Declaration
public double M11 { get; set; }
Property Value
Type Description
Double

M12

Gets or sets the value at row 1, column 2 of this instance.

Declaration
public double M12 { get; set; }
Property Value
Type Description
Double

M13

Gets or sets the value at row 1, column 3 of this instance.

Declaration
public double M13 { get; set; }
Property Value
Type Description
Double

M21

Gets or sets the value at row 2, column 1 of this instance.

Declaration
public double M21 { get; set; }
Property Value
Type Description
Double

M22

Gets or sets the value at row 2, column 2 of this instance.

Declaration
public double M22 { get; set; }
Property Value
Type Description
Double

M23

Gets or sets the value at row 2, column 3 of this instance.

Declaration
public double M23 { get; set; }
Property Value
Type Description
Double

Trace

Gets the trace of the matrix, the sum of the values along the diagonal.

Declaration
public readonly double Trace { get; }
Property Value
Type Description
Double

Methods

Add(Matrix2x3d, Matrix2x3d)

Adds two instances.

Declaration
public static Matrix2x3d Add(Matrix2x3d left, Matrix2x3d right)
Parameters
Type Name Description
Matrix2x3d left

The left operand of the addition.

Matrix2x3d right

The right operand of the addition.

Returns
Type Description
Matrix2x3d

A new instance that is the result of the addition.

Add(ref Matrix2x3d, ref Matrix2x3d, out Matrix2x3d)

Adds two instances.

Declaration
public static void Add(ref Matrix2x3d left, ref Matrix2x3d right, out Matrix2x3d result)
Parameters
Type Name Description
Matrix2x3d left

The left operand of the addition.

Matrix2x3d right

The right operand of the addition.

Matrix2x3d result

A new instance that is the result of the addition.

CreateRotation(Double)

Builds a rotation matrix.

Declaration
public static Matrix2x3d CreateRotation(double angle)
Parameters
Type Name Description
Double angle

The counter-clockwise angle in radians.

Returns
Type Description
Matrix2x3d

The resulting Matrix2x3d instance.

CreateRotation(Double, out Matrix2x3d)

Builds a rotation matrix.

Declaration
public static void CreateRotation(double angle, out Matrix2x3d result)
Parameters
Type Name Description
Double angle

The counter-clockwise angle in radians.

Matrix2x3d result

The resulting Matrix2x3d instance.

CreateScale(Vector2d)

Creates a scale matrix.

Declaration
public static Matrix2x3d CreateScale(Vector2d scale)
Parameters
Type Name Description
Vector2d scale

Scale factors for the x and y axes.

Returns
Type Description
Matrix2x3d

A scale matrix.

CreateScale(Vector2d, out Matrix2x3d)

Creates a scale matrix.

Declaration
public static void CreateScale(Vector2d scale, out Matrix2x3d result)
Parameters
Type Name Description
Vector2d scale

Scale factors for the x and y axes.

Matrix2x3d result

A scale matrix.

CreateScale(Double)

Creates a scale matrix.

Declaration
public static Matrix2x3d CreateScale(double scale)
Parameters
Type Name Description
Double scale

Single scale factor for the x and y axes.

Returns
Type Description
Matrix2x3d

A scale matrix.

CreateScale(Double, out Matrix2x3d)

Creates a scale matrix.

Declaration
public static void CreateScale(double scale, out Matrix2x3d result)
Parameters
Type Name Description
Double scale

Single scale factor for the x, y, and z axes.

Matrix2x3d result

A scale matrix.

CreateScale(Double, Double)

Creates a scale matrix.

Declaration
public static Matrix2x3d CreateScale(double x, double y)
Parameters
Type Name Description
Double x

Scale factor for the x axis.

Double y

Scale factor for the y axis.

Returns
Type Description
Matrix2x3d

A scale matrix.

CreateScale(Double, Double, out Matrix2x3d)

Creates a scale matrix.

Declaration
public static void CreateScale(double x, double y, out Matrix2x3d result)
Parameters
Type Name Description
Double x

Scale factor for the x axis.

Double y

Scale factor for the y axis.

Matrix2x3d result

A scale matrix.

Equals(Matrix2x3d)

Indicates whether the current matrix is equal to another matrix.

Declaration
public bool Equals(Matrix2x3d other)
Parameters
Type Name Description
Matrix2x3d other

An matrix to compare with this matrix.

Returns
Type Description
Boolean

true if the current matrix is equal to the matrix parameter; otherwise, false.

Equals(Object)

Indicates whether this instance and a specified object are equal.

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
Object obj

The object to compare tresult.

Returns
Type Description
Boolean

True if the instances are equal; false otherwise.

Overrides
ValueType.Equals(Object)

GetHashCode()

Returns the hashcode for this instance.

Declaration
public override int GetHashCode()
Returns
Type Description
Int32

A System.Int32 containing the unique hashcode for this instance.

Overrides
ValueType.GetHashCode()

Mult(Matrix2x3d, Matrix3)

Multiplies two instances.

Declaration
public static Matrix2x3d Mult(Matrix2x3d left, Matrix3 right)
Parameters
Type Name Description
Matrix2x3d left

The left operand of the multiplication.

Matrix3 right

The right operand of the multiplication.

Returns
Type Description
Matrix2x3d

A new instance that is the result of the multiplication.

Mult(Matrix2x3d, Matrix3x2)

Multiplies two instances.

Declaration
public static Matrix2d Mult(Matrix2x3d left, Matrix3x2 right)
Parameters
Type Name Description
Matrix2x3d left

The left operand of the multiplication.

Matrix3x2 right

The right operand of the multiplication.

Returns
Type Description
Matrix2d

A new instance that is the result of the multiplication.

Mult(Matrix2x3d, Matrix3x4)

Multiplies two instances.

Declaration
public static Matrix2x4d Mult(Matrix2x3d left, Matrix3x4 right)
Parameters
Type Name Description
Matrix2x3d left

The left operand of the multiplication.

Matrix3x4 right

The right operand of the multiplication.

Returns
Type Description
Matrix2x4d

A new instance that is the result of the multiplication.

Mult(Matrix2x3d, Double)

Multiplies and instance by a scalar.

Declaration
public static Matrix2x3d Mult(Matrix2x3d left, double right)
Parameters
Type Name Description
Matrix2x3d left

The left operand of the multiplication.

Double right

The right operand of the multiplication.

Returns
Type Description
Matrix2x3d

A new instance that is the result of the multiplication.

Mult(ref Matrix2x3d, ref Matrix3, out Matrix2x3d)

Multiplies two instances.

Declaration
public static void Mult(ref Matrix2x3d left, ref Matrix3 right, out Matrix2x3d result)
Parameters
Type Name Description
Matrix2x3d left

The left operand of the multiplication.

Matrix3 right

The right operand of the multiplication.

Matrix2x3d result

A new instance that is the result of the multiplication.

Mult(ref Matrix2x3d, ref Matrix3x2, out Matrix2d)

Multiplies two instances.

Declaration
public static void Mult(ref Matrix2x3d left, ref Matrix3x2 right, out Matrix2d result)
Parameters
Type Name Description
Matrix2x3d left

The left operand of the multiplication.

Matrix3x2 right

The right operand of the multiplication.

Matrix2d result

A new instance that is the result of the multiplication.

Mult(ref Matrix2x3d, ref Matrix3x4, out Matrix2x4d)

Multiplies two instances.

Declaration
public static void Mult(ref Matrix2x3d left, ref Matrix3x4 right, out Matrix2x4d result)
Parameters
Type Name Description
Matrix2x3d left

The left operand of the multiplication.

Matrix3x4 right

The right operand of the multiplication.

Matrix2x4d result

A new instance that is the result of the multiplication.

Mult(ref Matrix2x3d, Double, out Matrix2x3d)

Multiplies and instance by a scalar.

Declaration
public static void Mult(ref Matrix2x3d left, double right, out Matrix2x3d result)
Parameters
Type Name Description
Matrix2x3d left

The left operand of the multiplication.

Double right

The right operand of the multiplication.

Matrix2x3d result

A new instance that is the result of the multiplication.

Subtract(Matrix2x3d, Matrix2x3d)

Subtracts two instances.

Declaration
public static Matrix2x3d Subtract(Matrix2x3d left, Matrix2x3d right)
Parameters
Type Name Description
Matrix2x3d left

The left operand of the subtraction.

Matrix2x3d right

The right operand of the subtraction.

Returns
Type Description
Matrix2x3d

A new instance that is the result of the subtraction.

Subtract(ref Matrix2x3d, ref Matrix2x3d, out Matrix2x3d)

Subtracts two instances.

Declaration
public static void Subtract(ref Matrix2x3d left, ref Matrix2x3d right, out Matrix2x3d result)
Parameters
Type Name Description
Matrix2x3d left

The left operand of the subtraction.

Matrix2x3d right

The right operand of the subtraction.

Matrix2x3d result

A new instance that is the result of the subtraction.

ToString()

Returns a System.String that represents the current Matrix2x3d.

Declaration
public override string ToString()
Returns
Type Description
String

The string representation of the matrix.

Overrides
ValueType.ToString()

Transpose(Matrix2x3d)

Calculate the transpose of the given matrix.

Declaration
public static Matrix3x2d Transpose(Matrix2x3d mat)
Parameters
Type Name Description
Matrix2x3d mat

The matrix to transpose.

Returns
Type Description
Matrix3x2d

The transpose of the given matrix.

Transpose(ref Matrix2x3d, out Matrix3x2d)

Calculate the transpose of the given matrix.

Declaration
public static void Transpose(ref Matrix2x3d mat, out Matrix3x2d result)
Parameters
Type Name Description
Matrix2x3d mat

The matrix to transpose.

Matrix3x2d result

The transpose of the given matrix.

Operators

Addition(Matrix2x3d, Matrix2x3d)

Matrix addition

Declaration
public static Matrix2x3d operator +(Matrix2x3d left, Matrix2x3d right)
Parameters
Type Name Description
Matrix2x3d left

left-hand operand

Matrix2x3d right

right-hand operand

Returns
Type Description
Matrix2x3d

A new Matrix2x3d which holds the result of the addition

Equality(Matrix2x3d, Matrix2x3d)

Compares two instances for equality.

Declaration
public static bool operator ==(Matrix2x3d left, Matrix2x3d right)
Parameters
Type Name Description
Matrix2x3d left

The first instance.

Matrix2x3d right

The second instance.

Returns
Type Description
Boolean

True, if left equals right; false otherwise.

Inequality(Matrix2x3d, Matrix2x3d)

Compares two instances for inequality.

Declaration
public static bool operator !=(Matrix2x3d left, Matrix2x3d right)
Parameters
Type Name Description
Matrix2x3d left

The first instance.

Matrix2x3d right

The second instance.

Returns
Type Description
Boolean

True, if left does not equal right; false otherwise.

Multiply(Matrix2x3d, Matrix3)

Matrix multiplication

Declaration
public static Matrix2x3d operator *(Matrix2x3d left, Matrix3 right)
Parameters
Type Name Description
Matrix2x3d left

left-hand operand

Matrix3 right

right-hand operand

Returns
Type Description
Matrix2x3d

A new Matrix2x3d which holds the result of the multiplication

Multiply(Matrix2x3d, Matrix3x2)

Matrix multiplication

Declaration
public static Matrix2d operator *(Matrix2x3d left, Matrix3x2 right)
Parameters
Type Name Description
Matrix2x3d left

left-hand operand

Matrix3x2 right

right-hand operand

Returns
Type Description
Matrix2d

A new Matrix2d which holds the result of the multiplication

Multiply(Matrix2x3d, Matrix3x4)

Matrix multiplication

Declaration
public static Matrix2x4d operator *(Matrix2x3d left, Matrix3x4 right)
Parameters
Type Name Description
Matrix2x3d left

left-hand operand

Matrix3x4 right

right-hand operand

Returns
Type Description
Matrix2x4d

A new Matrix2x4d which holds the result of the multiplication

Multiply(Matrix2x3d, Double)

Scalar multiplication.

Declaration
public static Matrix2x3d operator *(Matrix2x3d left, double right)
Parameters
Type Name Description
Matrix2x3d left

left-hand operand

Double right

right-hand operand

Returns
Type Description
Matrix2x3d

A new Matrix2x3d which holds the result of the multiplication

Multiply(Double, Matrix2x3d)

Scalar multiplication.

Declaration
public static Matrix2x3d operator *(double left, Matrix2x3d right)
Parameters
Type Name Description
Double left

left-hand operand

Matrix2x3d right

right-hand operand

Returns
Type Description
Matrix2x3d

A new Matrix2x3d which holds the result of the multiplication

Subtraction(Matrix2x3d, Matrix2x3d)

Matrix subtraction

Declaration
public static Matrix2x3d operator -(Matrix2x3d left, Matrix2x3d right)
Parameters
Type Name Description
Matrix2x3d left

left-hand operand

Matrix2x3d right

right-hand operand

Returns
Type Description
Matrix2x3d

A new Matrix2x3d which holds the result of the subtraction

Implements

System.IEquatable<T>
In This Article
Back to top Generated by DocFX