Struct double3x3
Represents a 3x3 Matrix
Implements
Inherited Members
Namespace: Fusee.Math.Core
Assembly: Fusee.Math.Core.dll
Syntax
public struct double3x3 : IEquatable<double3x3>
Constructors
double3x3(double3, double3, double3)
Constructs a new instance.
Declaration
public double3x3(double3 row1, double3 row2, double3 row3)
Parameters
Type | Name | Description |
---|---|---|
double3 | row1 | Top row of the matrix |
double3 | row2 | Second row of the matrix |
double3 | row3 | Third row of the matrix |
double3x3(double4x4)
Constructs a new instance.
Declaration
public double3x3(double4x4 mat4)
Parameters
Type | Name | Description |
---|---|---|
double4x4 | mat4 | The incoming double4x4. |
double3x3(Double, Double, Double, Double, Double, Double, Double, Double, Double)
Constructs a new instance.
Declaration
public double3x3(double m11, double m12, double m13, double m21, double m22, double m23, double m31, double m32, double m33)
Parameters
Type | Name | Description |
---|---|---|
System.Double | m11 | First item of the first row of the matrix. |
System.Double | m12 | Second item of the first row of the matrix. |
System.Double | m13 | Third item of the first row of the matrix. |
System.Double | m21 | First item of the second row of the matrix. |
System.Double | m22 | Second item of the second row of the matrix. |
System.Double | m23 | Third item of the second row of the matrix. |
System.Double | m31 | First item of the third row of the matrix. |
System.Double | m32 | Second item of the third row of the matrix. |
System.Double | m33 | Third item of the third row of the matrix. |
Fields
Identity
The identity matrix
Declaration
public static readonly double3x3 Identity
Field Value
Type | Description |
---|---|
double3x3 |
Row1
Top row of the matrix
Declaration
public double3 Row1
Field Value
Type | Description |
---|---|
double3 |
Row2
2nd row of the matrix
Declaration
public double3 Row2
Field Value
Type | Description |
---|---|
double3 |
Row3
3rd row of the matrix
Declaration
public double3 Row3
Field Value
Type | Description |
---|---|
double3 |
Zero
The zero matrix
Declaration
public static readonly double3x3 Zero
Field Value
Type | Description |
---|---|
double3x3 |
Properties
Column1
The first column of this matrix
Declaration
public double3 Column1 { get; set; }
Property Value
Type | Description |
---|---|
double3 |
Column2
The second column of this matrix
Declaration
public double3 Column2 { get; set; }
Property Value
Type | Description |
---|---|
double3 |
Column3
The third column of this matrix
Declaration
public double3 Column3 { get; set; }
Property Value
Type | Description |
---|---|
double3 |
Determinant
The determinant of this matrix
Declaration
public readonly double Determinant { get; }
Property Value
Type | Description |
---|---|
System.Double |
IsAffine
Indicates whether the current matrix represents an affine transformation.
Declaration
public readonly bool IsAffine { get; }
Property Value
Type | Description |
---|---|
System.Boolean | true if the current matrix represents an affine transformation; otherwise, false. |
M11
Gets and sets the value at row 1, column 1 of this instance.
Declaration
public double M11 { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
M12
Gets and sets the value at row 1, column 2 of this instance.
Declaration
public double M12 { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
M13
Gets and sets the value at row 1, column 3 of this instance.
Declaration
public double M13 { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
M21
Gets and sets the value at row 2, column 1 of this instance.
Declaration
public double M21 { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
M22
Gets and sets the value at row 2, column 2 of this instance.
Declaration
public double M22 { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
M23
Gets and sets the value at row 2, column 3 of this instance.
Declaration
public double M23 { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
M31
Gets and sets the value at row 3, column 1 of this instance.
Declaration
public double M31 { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
M32
Gets and sets the value at row 3, column 2 of this instance.
Declaration
public double M32 { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
M33
Gets and sets the value at row 3, column 3 of this instance.
Declaration
public double M33 { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
ParseConverter
Gets and sets the Converter object. Has the ability to convert a string to a double3x3.
Declaration
public static Converter<string, double3x3> ParseConverter { get; set; }
Property Value
Type | Description |
---|---|
Converter<System.String, double3x3> | The parse property. |
Methods
Add(double3x3, double3x3)
Adds two instances.
Declaration
public static double3x3 Add(double3x3 left, double3x3 right)
Parameters
Type | Name | Description |
---|---|---|
double3x3 | left | The left operand of the addition. |
double3x3 | right | The right operand of the addition. |
Returns
Type | Description |
---|---|
double3x3 | A new instance that is the result of the addition. |
Equals(double3x3)
Indicates whether the current matrix is equal to another matrix.
Declaration
public bool Equals(double3x3 other)
Parameters
Type | Name | Description |
---|---|---|
double3x3 | other | A matrix to compare with this matrix. |
Returns
Type | Description |
---|---|
System.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 |
---|---|---|
System.Object | obj | The object to compare. |
Returns
Type | Description |
---|---|
System.Boolean | True if the instances are equal; false otherwise. |
Overrides
GetHashCode()
Returns the hashcode for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | A System.Int32 containing the unique hashcode for this instance. |
Overrides
Mult(double3x3, double3x3)
Multiplies two instances.
Declaration
public static double3x3 Mult(double3x3 left, double3x3 right)
Parameters
Type | Name | Description |
---|---|---|
double3x3 | left | The left operand of the multiplication. |
double3x3 | right | The right operand of the multiplication. |
Returns
Type | Description |
---|---|
double3x3 | A new instance that is the result of the multiplication |
Parse(String, IFormatProvider)
Parses a string into a double3x3.
Declaration
public static double3x3 Parse(string source, IFormatProvider provider = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | source | |
System.IFormatProvider | provider |
Returns
Type | Description |
---|---|
double3x3 |
Subtract(double3x3, double3x3)
Subtracts the right instance from the left instance.
Declaration
public static double3x3 Subtract(double3x3 left, double3x3 right)
Parameters
Type | Name | Description |
---|---|---|
double3x3 | left | The left operand of the subtraction. |
double3x3 | right | The right operand of the subtraction. |
Returns
Type | Description |
---|---|
double3x3 | A new instance that is the result of the subtraction. |
ToArray()
Returns this matrix as an array
Declaration
public double[] ToArray()
Returns
Type | Description |
---|---|
System.Double[] |
ToString()
Returns a System.String that represents the current double3x3.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | A string. |
Overrides
ToString(IFormatProvider)
Returns a System.String that represents the current double3x3.
Declaration
public string ToString(IFormatProvider provider)
Parameters
Type | Name | Description |
---|---|---|
System.IFormatProvider | provider | Provides information about a specific culture. |
Returns
Type | Description |
---|---|
System.String | A System.String that represents this instance. |
Transform(double2, double3x3)
Transforms a given vector by a matrix via matrix*vector (post-multiplication of the vector).
Declaration
public static double2 Transform(double2 vector, double3x3 matrix)
Parameters
Type | Name | Description |
---|---|---|
double2 | vector | A double2 instance. |
double3x3 | matrix | A double3x3 instance. |
Returns
Type | Description |
---|---|
double2 | A new double2 instance containing the result. |
Transform(double3, double3x3)
Transforms a given vector by a matrix via vector*matrix (pre-multiplication of the vector).
Declaration
public static double3 Transform(double3 vector, double3x3 matrix)
Parameters
Type | Name | Description |
---|---|---|
double3 | vector | A double3 instance. |
double3x3 | matrix | A double3x3 instance. |
Returns
Type | Description |
---|---|
double3 | A new double3 instance containing the result. |
Transform(double3x3, double2)
Transforms a given vector by a matrix via matrix*vector (post-multiplication of the vector).
Declaration
public static double2 Transform(double3x3 matrix, double2 vector)
Parameters
Type | Name | Description |
---|---|---|
double3x3 | matrix | A double3x3 instance. |
double2 | vector | A double2 instance. |
Returns
Type | Description |
---|---|
double2 | A new double2 instance containing the result. |
Transform(double3x3, double3)
Transforms a given vector by a matrix via matrix*vector (post-multiplication of the vector).
Declaration
public static double3 Transform(double3x3 matrix, double3 vector)
Parameters
Type | Name | Description |
---|---|---|
double3x3 | matrix | A double3x3 instance. |
double3 | vector | A double3 instance. |
Returns
Type | Description |
---|---|
double3 | A new double3 instance containing the result. |
Transpose()
Returns the transposes of this instance.
Declaration
public double3x3 Transpose()
Returns
Type | Description |
---|---|
double3x3 |
Transpose(double3x3)
Calculate the transpose of the given matrix
Declaration
public static double3x3 Transpose(double3x3 mat)
Parameters
Type | Name | Description |
---|---|---|
double3x3 | mat | The matrix to transpose |
Returns
Type | Description |
---|---|
double3x3 | The transpose of the given matrix |
Operators
Addition(double3x3, double3x3)
Matrix addition
Declaration
public static double3x3 operator +(double3x3 left, double3x3 right)
Parameters
Type | Name | Description |
---|---|---|
double3x3 | left | left-hand operand |
double3x3 | right | right-hand operand |
Returns
Type | Description |
---|---|
double3x3 | A new double3x3 which holds the result of the multiplication |
Equality(double3x3, double3x3)
Compares two instances for equality.
Declaration
public static bool operator ==(double3x3 left, double3x3 right)
Parameters
Type | Name | Description |
---|---|---|
double3x3 | left | The first instance. |
double3x3 | right | The second instance. |
Returns
Type | Description |
---|---|
System.Boolean | True, if left equals right; false otherwise. |
Inequality(double3x3, double3x3)
Compares two instances for inequality.
Declaration
public static bool operator !=(double3x3 left, double3x3 right)
Parameters
Type | Name | Description |
---|---|---|
double3x3 | left | The first instance. |
double3x3 | right | The second instance. |
Returns
Type | Description |
---|---|
System.Boolean | True, if left does not equal right; false otherwise. |
Multiply(double2, double3x3)
Transforms a given vector by a matrix via matrix*vector (post-multiplication of the vector).
Declaration
public static double2 operator *(double2 vector, double3x3 matrix)
Parameters
Type | Name | Description |
---|---|---|
double2 | vector | A double2 instance. |
double3x3 | matrix | A double3x3 instance. |
Returns
Type | Description |
---|---|
double2 | A new double2 instance containing the result. |
Multiply(double3, double3x3)
Transforms a given vector by a matrix via vector*matrix (pre-multiplication of the vector).
Declaration
public static double3 operator *(double3 vector, double3x3 matrix)
Parameters
Type | Name | Description |
---|---|---|
double3 | vector | A double3 instance. |
double3x3 | matrix | A double3x3 instance. |
Returns
Type | Description |
---|---|
double3 | A new double3 instance containing the result. |
Multiply(double3x3, double2)
Transforms a given vector by a matrix via matrix*vector (post-multiplication of the vector).
Declaration
public static double2 operator *(double3x3 matrix, double2 vector)
Parameters
Type | Name | Description |
---|---|---|
double3x3 | matrix | A double3x3 instance. |
double2 | vector | A double2 instance. |
Returns
Type | Description |
---|---|
double2 | A new double2 instance containing the result. |
Multiply(double3x3, double3)
Transforms a given vector by a matrix via matrix*vector (post-multiplication of the vector).
Declaration
public static double3 operator *(double3x3 matrix, double3 vector)
Parameters
Type | Name | Description |
---|---|---|
double3x3 | matrix | A double3x3 instance. |
double3 | vector | A double3 instance. |
Returns
Type | Description |
---|---|
double3 | A new double3 instance containing the result. |
Multiply(double3x3, double3x3)
Matrix multiplication
Declaration
public static double3x3 operator *(double3x3 left, double3x3 right)
Parameters
Type | Name | Description |
---|---|---|
double3x3 | left | left-hand operand |
double3x3 | right | right-hand operand |
Returns
Type | Description |
---|---|
double3x3 | A new Float3x3 which holds the result of the multiplication |
Subtraction(double3x3, double3x3)
Matrix subtraction
Declaration
public static double3x3 operator -(double3x3 left, double3x3 right)
Parameters
Type | Name | Description |
---|---|---|
double3x3 | left | left-hand operand |
double3x3 | right | right-hand operand |
Returns
Type | Description |
---|---|
double3x3 | A new double2x2 which holds the result of the multiplication |