Show / Hide Table of Contents

Struct Matrix3

Represents a 3x3 double precision matrix.

Implements
System.IEquatable<Matrix3>
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: netDxf
Assembly: CADability.dll
Syntax
public struct Matrix3 : IEquatable<Matrix3>

Constructors

| Improve this Doc View Source

Matrix3(Double, Double, Double, Double, Double, Double, Double, Double, Double)

Initializes a new instance of Matrix3.

Declaration
public Matrix3(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

Element [0,0].

System.Double m12

Element [0,1].

System.Double m13

Element [0,2].

System.Double m21

Element [1,0].

System.Double m22

Element [1,1].

System.Double m23

Element [1,2].

System.Double m31

Element [2,0].

System.Double m32

Element [2,1].

System.Double m33

Element [2,2].

Properties

| Improve this Doc View Source

Identity

Gets the identity matrix.

Declaration
public static Matrix3 Identity { get; }
Property Value
Type Description
Matrix3
| Improve this Doc View Source

IsIdentity

Gets if the actual matrix is the identity.

Declaration
public bool IsIdentity { get; }
Property Value
Type Description
System.Boolean
Remarks

The checks to see if the matrix is the identity uses the MathHelper.Epsilon as a the threshold for testing values close to one and zero.

| Improve this Doc View Source

Item[Int32, Int32]

Gets or sets the component at the given row and column index in the matrix.

Declaration
public double this[int row, int column] { get; set; }
Parameters
Type Name Description
System.Int32 row

The row index of the matrix.

System.Int32 column

The column index of the matrix.

Property Value
Type Description
System.Double

The component at the given row and column index in the matrix.

| Improve this Doc View Source

M11

Gets or sets the matrix element [0,0].

Declaration
public double M11 { get; set; }
Property Value
Type Description
System.Double
| Improve this Doc View Source

M12

Gets or sets the matrix element [0,1].

Declaration
public double M12 { get; set; }
Property Value
Type Description
System.Double
| Improve this Doc View Source

M13

Gets or sets the matrix element [0,2].

Declaration
public double M13 { get; set; }
Property Value
Type Description
System.Double
| Improve this Doc View Source

M21

Gets or sets the matrix element [1,0].

Declaration
public double M21 { get; set; }
Property Value
Type Description
System.Double
| Improve this Doc View Source

M22

Gets or sets the matrix element [1,1].

Declaration
public double M22 { get; set; }
Property Value
Type Description
System.Double
| Improve this Doc View Source

M23

Gets or sets the matrix element [1,2].

Declaration
public double M23 { get; set; }
Property Value
Type Description
System.Double
| Improve this Doc View Source

M31

Gets or sets the matrix element [2,0].

Declaration
public double M31 { get; set; }
Property Value
Type Description
System.Double
| Improve this Doc View Source

M32

Gets or sets the matrix element [2,1].

Declaration
public double M32 { get; set; }
Property Value
Type Description
System.Double
| Improve this Doc View Source

M33

Gets or sets the matrix element [2,2].

Declaration
public double M33 { get; set; }
Property Value
Type Description
System.Double
| Improve this Doc View Source

Zero

Gets the zero matrix.

Declaration
public static Matrix3 Zero { get; }
Property Value
Type Description
Matrix3

Methods

| Improve this Doc View Source

Add(Matrix3, Matrix3)

Matrix addition.

Declaration
public static Matrix3 Add(Matrix3 a, Matrix3 b)
Parameters
Type Name Description
Matrix3 a

Matrix3.

Matrix3 b

Matrix3.

Returns
Type Description
Matrix3

Matrix3.

| Improve this Doc View Source

Determinant()

Calculate the determinant of the actual matrix.

Declaration
public double Determinant()
Returns
Type Description
System.Double

Determinant.

| Improve this Doc View Source

Equals(Matrix3)

Check if the components of two matrices are approximate equal.

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

Matrix3.

Returns
Type Description
System.Boolean

True if the matrix components are almost equal or false in any other case.

| Improve this Doc View Source

Equals(Matrix3, Matrix3)

Check if the components of two matrices are approximate equal.

Declaration
public static bool Equals(Matrix3 a, Matrix3 b)
Parameters
Type Name Description
Matrix3 a

Matrix3.

Matrix3 b

Matrix3.

Returns
Type Description
System.Boolean

True if the matrix components are almost equal or false in any other case.

| Improve this Doc View Source

Equals(Matrix3, Matrix3, Double)

Check if the components of two matrices are approximate equal.

Declaration
public static bool Equals(Matrix3 a, Matrix3 b, double threshold)
Parameters
Type Name Description
Matrix3 a

Matrix3.

Matrix3 b

Matrix3.

System.Double threshold

Maximum tolerance.

Returns
Type Description
System.Boolean

True if the matrix components are almost equal or false in any other case.

| Improve this Doc View Source

Equals(Matrix3, Double)

Check if the components of two matrices are approximate equal.

Declaration
public bool Equals(Matrix3 obj, double threshold)
Parameters
Type Name Description
Matrix3 obj

Matrix3.

System.Double threshold

Maximum tolerance.

Returns
Type Description
System.Boolean

True if the matrix components are almost equal or false in any other case.

| Improve this Doc View Source

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

Another object to compare to.

Returns
Type Description
System.Boolean

True if obj and this instance are the same type and represent the same value; otherwise, false.

Overrides
System.ValueType.Equals(System.Object)
| Improve this Doc View Source

GetHashCode()

Returns the hash code for this instance.

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32

A 32-bit signed integer that is the hash code for this instance.

Overrides
System.ValueType.GetHashCode()
| Improve this Doc View Source

Inverse()

Calculates the inverse matrix.

Declaration
public Matrix3 Inverse()
Returns
Type Description
Matrix3

Inverse Matrix3.

| Improve this Doc View Source

Multiply(Matrix3, Matrix3)

Product of two matrices.

Declaration
public static Matrix3 Multiply(Matrix3 a, Matrix3 b)
Parameters
Type Name Description
Matrix3 a

Matrix3.

Matrix3 b

Matrix3.

Returns
Type Description
Matrix3

Matrix3.

| Improve this Doc View Source

Multiply(Matrix3, Vector3)

Product of a matrix with a vector.

Declaration
public static Vector3 Multiply(Matrix3 a, Vector3 u)
Parameters
Type Name Description
Matrix3 a

Matrix3.

Vector3 u

Vector3.

Returns
Type Description
Vector3

Matrix3.

Remarks

Matrix3 adopts the convention of using column vectors.

| Improve this Doc View Source

Multiply(Matrix3, Double)

Product of a matrix with a scalar.

Declaration
public static Matrix3 Multiply(Matrix3 m, double a)
Parameters
Type Name Description
Matrix3 m

Matrix3.

System.Double a

Scalar.

Returns
Type Description
Matrix3

Matrix3.

| Improve this Doc View Source

RotationX(Double)

Builds a rotation matrix for a rotation around the x-axis.

Declaration
public static Matrix3 RotationX(double angle)
Parameters
Type Name Description
System.Double angle

The counter-clockwise angle in radians.

Returns
Type Description
Matrix3

The resulting Matrix3 instance.

Remarks

Matrix3 adopts the convention of using column vectors to represent a transformation matrix.

| Improve this Doc View Source

RotationY(Double)

Builds a rotation matrix for a rotation around the y-axis.

Declaration
public static Matrix3 RotationY(double angle)
Parameters
Type Name Description
System.Double angle

The counter-clockwise angle in radians.

Returns
Type Description
Matrix3

The resulting Matrix3 instance.

Remarks

Matrix3 adopts the convention of using column vectors to represent a transformation matrix.

| Improve this Doc View Source

RotationZ(Double)

Builds a rotation matrix for a rotation around the z-axis.

Declaration
public static Matrix3 RotationZ(double angle)
Parameters
Type Name Description
System.Double angle

The counter-clockwise angle in radians.

Returns
Type Description
Matrix3

The resulting Matrix3 instance.

Remarks

Matrix3 adopts the convention of using column vectors to represent a transformation matrix.

| Improve this Doc View Source

Scale(Vector3)

Build a scaling matrix.

Declaration
public static Matrix3 Scale(Vector3 value)
Parameters
Type Name Description
Vector3 value

Scale factors for x, y, and z axis.

Returns
Type Description
Matrix3

A scaling matrix.

| Improve this Doc View Source

Scale(Double)

Build a scaling matrix.

Declaration
public static Matrix3 Scale(double value)
Parameters
Type Name Description
System.Double value

Single scale factor for x, y, and z axis.

Returns
Type Description
Matrix3

A scaling matrix.

| Improve this Doc View Source

Scale(Double, Double, Double)

Build a scaling matrix.

Declaration
public static Matrix3 Scale(double x, double y, double z)
Parameters
Type Name Description
System.Double x

Scale factor for x-axis.

System.Double y

Scale factor for y-axis.

System.Double z

Scale factor for z-axis.

Returns
Type Description
Matrix3

A scaling matrix.

| Improve this Doc View Source

Subtract(Matrix3, Matrix3)

Matrix subtraction.

Declaration
public static Matrix3 Subtract(Matrix3 a, Matrix3 b)
Parameters
Type Name Description
Matrix3 a

Matrix3.

Matrix3 b

Matrix3.

Returns
Type Description
Matrix3

Matrix3.

| Improve this Doc View Source

ToString()

Obtains a string that represents the matrix.

Declaration
public override string ToString()
Returns
Type Description
System.String

A string text.

Overrides
System.ValueType.ToString()
| Improve this Doc View Source

ToString(IFormatProvider)

Obtains a string that represents the matrix.

Declaration
public string ToString(IFormatProvider provider)
Parameters
Type Name Description
System.IFormatProvider provider

An IFormatProvider interface implementation that supplies culture-specific formatting information.

Returns
Type Description
System.String

A string text.

| Improve this Doc View Source

Transpose()

Obtains the transpose matrix.

Declaration
public Matrix3 Transpose()
Returns
Type Description
Matrix3

Transpose matrix.

Operators

| Improve this Doc View Source

Addition(Matrix3, Matrix3)

Matrix addition.

Declaration
public static Matrix3 operator +(Matrix3 a, Matrix3 b)
Parameters
Type Name Description
Matrix3 a

Matrix3.

Matrix3 b

Matrix3.

Returns
Type Description
Matrix3

Matrix3.

| Improve this Doc View Source

Equality(Matrix3, Matrix3)

Check if the components of two matrices are equal.

Declaration
public static bool operator ==(Matrix3 u, Matrix3 v)
Parameters
Type Name Description
Matrix3 u

Matrix3.

Matrix3 v

Matrix3.

Returns
Type Description
System.Boolean

True if the matrix components are equal or false in any other case.

| Improve this Doc View Source

Inequality(Matrix3, Matrix3)

Check if the components of two matrices are different.

Declaration
public static bool operator !=(Matrix3 u, Matrix3 v)
Parameters
Type Name Description
Matrix3 u

Matrix3.

Matrix3 v

Matrix3.

Returns
Type Description
System.Boolean

True if the matrix components are different or false in any other case.

| Improve this Doc View Source

Multiply(Matrix3, Matrix3)

Product of two matrices.

Declaration
public static Matrix3 operator *(Matrix3 a, Matrix3 b)
Parameters
Type Name Description
Matrix3 a

Matrix3.

Matrix3 b

Matrix3.

Returns
Type Description
Matrix3

Matrix3.

| Improve this Doc View Source

Multiply(Matrix3, Vector3)

Product of a matrix with a vector.

Declaration
public static Vector3 operator *(Matrix3 a, Vector3 u)
Parameters
Type Name Description
Matrix3 a

Matrix3.

Vector3 u

Vector3.

Returns
Type Description
Vector3

Matrix3.

Remarks

Matrix3 adopts the convention of using column vectors.

| Improve this Doc View Source

Multiply(Matrix3, Double)

Product of a matrix with a scalar.

Declaration
public static Matrix3 operator *(Matrix3 m, double a)
Parameters
Type Name Description
Matrix3 m

Matrix3.

System.Double a

Scalar.

Returns
Type Description
Matrix3

Matrix3.

| Improve this Doc View Source

Subtraction(Matrix3, Matrix3)

Matrix subtraction.

Declaration
public static Matrix3 operator -(Matrix3 a, Matrix3 b)
Parameters
Type Name Description
Matrix3 a

Matrix3.

Matrix3 b

Matrix3.

Returns
Type Description
Matrix3

Matrix3.

Implements

System.IEquatable<T>
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX