T_Rhino_Geometry_Matrix - mcneel/rhinocommon-api-docs GitHub Wiki

Matrix Class

Represents an arbitrarily sized matrix of double-precision floating point numbers. If you are working with a 4x4 matrix, then you may want to use the Transform class instead.

Inheritance Hierarchy

System.Object
  Rhino.Geometry.Matrix
Namespace: Rhino.Geometry
Assembly: RhinoCommon (in RhinoCommon.dll) Version: Rhino 6.0

Syntax

C#

public class Matrix : IDisposable

VB

Public Class Matrix
	Implements IDisposable

The Matrix type exposes the following members.

Constructors

 

Name Description
Public method Matrix(Transform) Initializes a new instance of the matrix based on a 4x4 matrix Transform.
Public method Matrix(Int32, Int32) Initializes a new instance of the matrix.
  Back to Top

Properties

 

Name Description
Public property ColumnCount Gets the amount of columns.
Public property IsColumnOrthogonal Gets a value indicating whether the matrix is column orthogonal.
Public property IsColumnOrthoNormal Gets a value indicating whether the matrix is column orthonormal.
Public property IsRowOrthogonal Gets a value indicating whether the matrix is row orthogonal.
Public property IsRowOrthoNormal Gets a value indicating whether the matrix is row orthonormal.
Public property IsSquare Gets a value indicating whether this matrix has the same number of rows and columns. 0x0 matrices are not considered square.
Public property IsValid Gets a value indicating whether this matrix is valid.
Public property Item Gets or sets the matrix value at the given row and column indixes.
Public property RowCount Gets the amount of rows.
  Back to Top

Methods

 

Name Description
Public method BackSolve Solves Mx=b where M is upper triangular with a unit diagonal and b is a column of values.
Public method BackSolvePoints Solves Mx=b where M is upper triangular with a unit diagonal and b is a column of 3d points.
Public method Dispose() Actively reclaims unmanaged resources that this instance uses.
Protected method Dispose(Boolean) For derived class implementers. This method is called with argument true when class user calls Dispose(), while with argument false when the Garbage Collector invokes the finalizer, or Finalize() method.

You must reclaim all used unmanaged resources in both cases, and can use this chance to call Dispose on disposable fields if the argument is true.

Also, you must call the base virtual method within your overriding method.

Public method Duplicate Create a duplicate of this matrix.
Public method Equals Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected method Finalize Passively reclaims unmanaged resources when the class user did not explicitly call Dispose(). (Overrides Object.Finalize().)
Public method GetHashCode Gets the hash code for this matrix. The hash code will change when the matrix changes so you cannot change matrices while they are stored in hash tables. (Overrides Object.GetHashCode().)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method Invert Modifies this matrix to become its own inverse. Matrix might be non-invertible (singular) and the return value will be false.
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method RowReduce(Double, Point3d[], Double) Row reduces a matrix as the first step in solving MX=b where b is a column of 3d points.
Public method RowReduce(Double, Double, Double) Row reduces a matrix to calculate rank and determinant.
Public method RowReduce(Double, Double[], Double) Row reduces a matrix as the first step in solving MX=b where b is a column of values.
Public method Scale Modifies the current matrix by multiplying its values by a number.
Public method SetDiagonal Sets diagonal value and zeros off all non-diagonal values.
Public method SwapColumns Exchanges two columns.
Public method SwapRows Exchanges two rows.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Public method Transpose Modifies this matrix to be its transpose. This is like swapping rows with columns.

http://en.wikipedia.org/wiki/Transpose

Public method Zero Sets all values inside the matrix to zero.
  Back to Top

Operators

 

Name Description
Public operatorStatic member Addition Adds two matrices and returns a new sum matrix.
Public operatorStatic member Multiply Multiplies two matrices and returns a new product matrix.
  Back to Top

Version Information

Supported in: 6.0.16224.21491, 5D58w

See Also

Reference

Rhino.Geometry Namespace

⚠️ **GitHub.com Fallback** ⚠️