> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Class TMatrix

Namespace: [VM.Managed](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed)\
Assembly: VMAppCore.dll

This class is to represent the matrix of transform.

```csharp theme={null}
public sealed class TMatrix : MatrixBase, IOMatrix
```

#### Inheritance

object ←
[MatrixBase](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.MatrixBase.md) ←
[TMatrix](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.TMatrix.md)

#### Implements

[IOMatrix](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.IOMatrix.md)

#### Extension Methods

[LinkPropertyItemCache.GetLinkProperties(object, LinkPropertyType)](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Models.Pre.Cache.LinkPropertyItemCache.md#VM_Models_Pre_Cache_LinkPropertyItemCache_GetLinkProperties_System_Object_VM_Models_Pre_LinkPropertyType_),
[LinkPropertyItemCache.GetLinkPropertiesAndValues(object, LinkPropertyType)](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Models.Pre.Cache.LinkPropertyItemCache.md#VM_Models_Pre_Cache_LinkPropertyItemCache_GetLinkPropertiesAndValues_System_Object_VM_Models_Pre_LinkPropertyType_),
[LinkPropertyItemCache.GetLinkedObjects\<T>(object, LinkPropertyType)](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Models.Pre.Cache.LinkPropertyItemCache.md#VM_Models_Pre_Cache_LinkPropertyItemCache_GetLinkedObjects__1_System_Object_VM_Models_Pre_LinkPropertyType_)

## Constructors

### TMatrix(double\[])

Initializes a new instance of the [TMatrix](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.TMatrix.md) class.

```csharp theme={null}
public TMatrix(double[] arr)
```

#### Parameters

`arr` double\[]

The data of orientation.

### TMatrix(Plane, VectorBase, VectorBase, VectorBase)

Initializes a new instance of the [TMatrix](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.TMatrix.md) class.

```csharp theme={null}
public TMatrix(Plane type, VectorBase vecMaster, VectorBase vecSlave, VectorBase vecPos)
```

#### Parameters

`type` Plane

The type of plane.

`vecMaster` [VectorBase](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.VectorBase.md)

The vector for master.

`vecSlave` [VectorBase](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.VectorBase.md)

The vector for slave.

`vecPos` [VectorBase](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.VectorBase.md)

The position.

### TMatrix(Plane, VectorBase, VectorBase)

Initializes a new instance of the [TMatrix](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.TMatrix.md) class.

```csharp theme={null}
public TMatrix(Plane type, VectorBase vecMaster, VectorBase vecSlave)
```

#### Parameters

`type` Plane

The type of plane.

`vecMaster` [VectorBase](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.VectorBase.md)

The vector for master.

`vecSlave` [VectorBase](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.VectorBase.md)

The vector for slave.

### TMatrix(TMatrix)

Initializes a new instance of the [TMatrix](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.TMatrix.md) class.

```csharp theme={null}
public TMatrix(TMatrix mat)
```

#### Parameters

`mat` [TMatrix](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.TMatrix.md)

The matrix of transform

### TMatrix()

Initializes a new instance of the [TMatrix](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.TMatrix.md) class.

```csharp theme={null}
public TMatrix()
```

### TMatrix(SerializationInfo, StreamingContext)

```csharp theme={null}
protected TMatrix(SerializationInfo info, StreamingContext context)
```

#### Parameters

`info` SerializationInfo

`context` StreamingContext

## Properties

### Array

Gets or sets the data of OMatrix.

```csharp theme={null}
public virtual double[] Array { get; set; }
```

#### Property Value

double\[]

### InverseTransformationMatrix

Gets the matrix of inverse transform.

```csharp theme={null}
public TMatrix InverseTransformationMatrix { get; }
```

#### Property Value

[TMatrix](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.TMatrix.md)

### Orientation

Gets the matrix of orientation.

```csharp theme={null}
public OMatrix Orientation { get; }
```

#### Property Value

[OMatrix](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.OMatrix.md)

### Position

Gets or sets the position of transform.

```csharp theme={null}
public VectorBase Position { get; set; }
```

#### Property Value

[VectorBase](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.VectorBase.md)

### XVector

Gets the XVector.

```csharp theme={null}
public virtual VectorBase XVector { get; }
```

#### Property Value

[VectorBase](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.VectorBase.md)

### YVector

Gets the YVector.

```csharp theme={null}
public virtual VectorBase YVector { get; }
```

#### Property Value

[VectorBase](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.VectorBase.md)

### ZVector

Gets the ZVector.

```csharp theme={null}
public virtual VectorBase ZVector { get; }
```

#### Property Value

[VectorBase](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.VectorBase.md)

### this\[uint, uint]

```csharp theme={null}
public double this[uint r, uint c] { get; set; }
```

#### Property Value

double

### this\[Coordinate, Coordinate]

```csharp theme={null}
public double this[Coordinate r, Coordinate c] { get; set; }
```

#### Property Value

double

### this\[uint]

```csharp theme={null}
public VectorBase this[uint n] { get; set; }
```

#### Property Value

[VectorBase](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.VectorBase.md)

### this\[Coordinate]

```csharp theme={null}
public VectorBase this[Coordinate n] { get; set; }
```

#### Property Value

[VectorBase](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.VectorBase.md)

## Methods

### Clone()

```csharp theme={null}
public object Clone()
```

#### Returns

object

### GetArray()

```csharp theme={null}
public double[] GetArray()
```

#### Returns

double\[]

### GetDirectionVector(uint)

Get the direction vector for axis.

```csharp theme={null}
public VectorBase GetDirectionVector(uint axis)
```

#### Parameters

`axis` uint

The type of axis.

#### Returns

[VectorBase](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.VectorBase.md)

The direction vector.

### GetDirectionVector(Coordinate)

Get the direction vector for axis.

```csharp theme={null}
public VectorBase GetDirectionVector(Coordinate axis)
```

#### Parameters

`axis` Coordinate

The type of axis.

#### Returns

[VectorBase](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.VectorBase.md)

The direction vector.

### GetObjectData(SerializationInfo, StreamingContext)

```csharp theme={null}
public void GetObjectData(SerializationInfo info, StreamingContext __unnamed001)
```

#### Parameters

`info` SerializationInfo

`__unnamed001` StreamingContext

### GetSchema()

```csharp theme={null}
public XmlSchema GetSchema()
```

#### Returns

XmlSchema

### Initialize()

Initializes a instance of OMatrix.

```csharp theme={null}
public void Initialize()
```

### Normalize()

Nomalize a instance of OMatrix.

```csharp theme={null}
public void Normalize()
```

### ReadXml(XmlReader)

```csharp theme={null}
public void ReadXml(XmlReader reader)
```

#### Parameters

`reader` XmlReader

### RotateAxisDeg(VectorBase, double)

To rotate counterclockwise for axis.

```csharp theme={null}
public void RotateAxisDeg(VectorBase axis, double dAngle)
```

#### Parameters

`axis` [VectorBase](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.VectorBase.md)

The rotation axis.

`dAngle` double

The degree.

### RotateAxisDeg(uint, double)

To rotate counterclockwise for coordinate.

```csharp theme={null}
public void RotateAxisDeg(uint nCoord, double dAngle)
```

#### Parameters

`nCoord` uint

The rotation coordinate.

`dAngle` double

The degree.

### RotateAxisDeg(Coordinate, double)

To rotate counterclockwise for coordinate.

```csharp theme={null}
public void RotateAxisDeg(Coordinate c, double dAngle)
```

#### Parameters

`c` Coordinate

The rotation coordinate.

`dAngle` double

The degree.

### RotateAxisRad(VectorBase, double)

To rotate counterclockwise for axis.

```csharp theme={null}
public void RotateAxisRad(VectorBase axis, double dAngle)
```

#### Parameters

`axis` [VectorBase](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.VectorBase.md)

The rotation axis.

`dAngle` double

The radian.

### RotateAxisRad(uint, double)

To rotate counterclockwise for coordinate.

```csharp theme={null}
public void RotateAxisRad(uint nCoord, double dAngle)
```

#### Parameters

`nCoord` uint

The rotation coordinate.

`dAngle` double

The radian.

### RotateAxisRad(Coordinate, double)

To rotate counterclockwise for coordinate.

```csharp theme={null}
public void RotateAxisRad(Coordinate c, double dAngle)
```

#### Parameters

`c` Coordinate

The rotation coordinate.

`dAngle` double

The radian.

### RotateXDeg(double)

To rotate counterclockwise for x-axis.

```csharp theme={null}
public void RotateXDeg(double dAngle)
```

#### Parameters

`dAngle` double

The degree.

### RotateXRad(double)

To rotate counterclockwise for x-axis.

```csharp theme={null}
public void RotateXRad(double dAngle)
```

#### Parameters

`dAngle` double

The radian.

### RotateYDeg(double)

To rotate counterclockwise for y-axis.

```csharp theme={null}
public void RotateYDeg(double dAngle)
```

#### Parameters

`dAngle` double

The degree.

### RotateYRad(double)

To rotate counterclockwise for y-axis.

```csharp theme={null}
public void RotateYRad(double dAngle)
```

#### Parameters

`dAngle` double

The radian.

### RotateZDeg(double)

To rotate counterclockwise for z-axis.

```csharp theme={null}
public void RotateZDeg(double dAngle)
```

#### Parameters

`dAngle` double

The degree.

### RotateZRad(double)

To rotate counterclockwise for z-axis.

```csharp theme={null}
public void RotateZRad(double dAngle)
```

#### Parameters

`dAngle` double

The radian.

### Set(double\[])

Set data of transform.

```csharp theme={null}
public void Set(double[] arr)
```

#### Parameters

`arr` double\[]

The data of transform

### Set(TMatrix)

Set Matrix of transform.

```csharp theme={null}
public void Set(TMatrix mat)
```

#### Parameters

`mat` [TMatrix](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.TMatrix.md)

The matrix of transform

### SetOrientation(double\[])

Set data of orientation.

```csharp theme={null}
public void SetOrientation(double[] arr)
```

#### Parameters

`arr` double\[]

The data of orientation.

### SetOrientation(OMatrix)

Set data of orientation.

```csharp theme={null}
public void SetOrientation(OMatrix mat)
```

#### Parameters

`mat` [OMatrix](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.OMatrix.md)

The matrix of orientation.

### SetOrientation(Plane, VectorBase, VectorBase)

Set data of orientation.

```csharp theme={null}
public void SetOrientation(Plane type, VectorBase vecMaster, VectorBase vecSlave)
```

#### Parameters

`type` Plane

The type of plane.

`vecMaster` [VectorBase](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.VectorBase.md)

The vector for master.

`vecSlave` [VectorBase](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.VectorBase.md)

The vector for slave.

### SetOrientationEADeg(RotationAxes, double, double, double)

Set data of orientation for euler angle. Unit is degree.

```csharp theme={null}
public void SetOrientationEADeg(RotationAxes ea, double dAlpha, double dBeta, double dGamma)
```

#### Parameters

`ea` RotationAxes

The type of euler angle.

`dAlpha` double

The alpha of euler angle.

`dBeta` double

The beta of euler angle.

`dGamma` double

The gamma of euler angle.

### SetOrientationEARad(RotationAxes, double, double, double)

Set data of orientation for euler angle. Unit is radian.

```csharp theme={null}
public void SetOrientationEARad(RotationAxes ea, double dAlpha, double dBeta, double dGamma)
```

#### Parameters

`ea` RotationAxes

The type of euler angle.

`dAlpha` double

The alpha of euler angle.

`dBeta` double

The beta of euler angle.

`dGamma` double

The gamma of euler angle.

### SetOrientationFixedAngleDeg(RotationAxes, double, double, double)

Set data of orientation for fixed angle. Unit is degree.

```csharp theme={null}
public void SetOrientationFixedAngleDeg(RotationAxes ea, double dAlpha, double dBeta, double dGamma)
```

#### Parameters

`ea` RotationAxes

The type of fixed angle.

`dAlpha` double

The alpha of fixed angle.

`dBeta` double

The beta of fixed angle.

`dGamma` double

The gamma of fixed angle.

### SetOrientationFixedAngleRad(RotationAxes, double, double, double)

Set data of orientation for fixed angle. Unit is radian.

```csharp theme={null}
public void SetOrientationFixedAngleRad(RotationAxes ea, double dAlpha, double dBeta, double dGamma)
```

#### Parameters

`ea` RotationAxes

The type of fixed angle.

`dAlpha` double

The alpha of fixed angle.

`dBeta` double

The beta of fixed angle.

`dGamma` double

The gamma of fixed angle.

### Translate(double, double, double)

To translate for position.

```csharp theme={null}
public void Translate(double dX, double dY, double dZ)
```

#### Parameters

`dX` double

The value of X

`dY` double

The value of y

`dZ` double

The value of z

### Translate(VectorBase)

To translate for position.

```csharp theme={null}
public void Translate(VectorBase vec)
```

#### Parameters

`vec` [VectorBase](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.VectorBase.md)

The vector

### TransposeOrientation()

Transposed rows and columns of the matrix.

```csharp theme={null}
public void TransposeOrientation()
```

### WriteXml(XmlWriter)

```csharp theme={null}
public void WriteXml(XmlWriter writer)
```

#### Parameters

`writer` XmlWriter

### op\_MultiplicationAssignment(VectorBase, TMatrix)

```csharp theme={null}
public static VectorBase op_MultiplicationAssignment(VectorBase vec, TMatrix mat)
```

#### Parameters

`vec` [VectorBase](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.VectorBase.md)

`mat` [TMatrix](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.TMatrix.md)

#### Returns

[VectorBase](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.VectorBase.md)

### op\_MultiplicationAssignment(TMatrix, TMatrix)

```csharp theme={null}
public static TMatrix op_MultiplicationAssignment(TMatrix mat1, TMatrix mat2)
```

#### Parameters

`mat1` [TMatrix](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.TMatrix.md)

`mat2` [TMatrix](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.TMatrix.md)

#### Returns

[TMatrix](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.TMatrix.md)

## Operators

### operator ==(TMatrix, TMatrix)

```csharp theme={null}
public static bool operator ==(TMatrix mat1, TMatrix mat2)
```

#### Parameters

`mat1` [TMatrix](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.TMatrix.md)

`mat2` [TMatrix](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.TMatrix.md)

#### Returns

bool

### implicit operator TMatrix(TMatrix)

```csharp theme={null}
public static implicit operator TMatrix(TMatrix mat)
```

#### Parameters

`mat` [TMatrix](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.TMatrix.md)

#### Returns

TMatrix

### implicit operator TMatrix(TMatrix)

```csharp theme={null}
public static implicit operator TMatrix(TMatrix mat)
```

#### Parameters

`mat` TMatrix

#### Returns

[TMatrix](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.TMatrix.md)

### operator !=(TMatrix, TMatrix)

```csharp theme={null}
public static bool operator !=(TMatrix mat1, TMatrix mat2)
```

#### Parameters

`mat1` [TMatrix](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.TMatrix.md)

`mat2` [TMatrix](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.TMatrix.md)

#### Returns

bool

### operator \*(VectorBase, TMatrix)

```csharp theme={null}
public static VectorBase operator *(VectorBase vec, TMatrix mat)
```

#### Parameters

`vec` [VectorBase](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.VectorBase.md)

`mat` [TMatrix](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.TMatrix.md)

#### Returns

[VectorBase](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.VectorBase.md)

### operator \*(TMatrix, TMatrix)

```csharp theme={null}
public static TMatrix operator *(TMatrix mat1, TMatrix mat2)
```

#### Parameters

`mat1` [TMatrix](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.TMatrix.md)

`mat2` [TMatrix](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.TMatrix.md)

#### Returns

[TMatrix](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/lib/VM.Managed.TMatrix.md)
