# Transform struct

Namespace: [Rhino.Geometry](https://developer.rhino3d.com/api/rhinocommon/namespace/rhino.geometry.md) · Assembly: [RhinoCommon](https://developer.rhino3d.com/api/rhinocommon/assembly/rhinocommon.md)

```cs
[StructLayout(LayoutKind.Sequential, Pack = 8, Size = 128)]
[Serializable]
public struct Transform : IComparable<Transform>, IEquatable<Transform>, ICloneable
```

Represents the values in a 4x4 transform matrix.

This is parallel to C++ ON_Xform.

## Constructors

- [Transform](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/ctor.md): (2 overloads) Initializes a new transform matrix with a specified value along the diagonal.

## Properties

- [Determinant](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/determinant.md): The determinant of this 4x4 matrix.
- [Identity](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/identity.md): (static) Gets a new identity transform matrix. An identity matrix defines no transformation.
- [IsAffine](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/isaffine.md): Tests for an affine transformation. A transformation is affine if it is valid and its last row is [0, 0, 0, 1]. An affine transformation can be broken into a linear transformation and a translation.
- [IsIdentity](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/isidentity.md): Return true if this Transform is the identity transform
- [IsLinear](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/islinear.md): Tests for a linear transformation. A transformation is affine if it is valid and its last row is [0, 0, 0, 1]. If in addition its last column is ( 0, 0, 0, 1)^T then it is linear. An affine transformation can be broken into a linear transformation and a translation.
- [IsRotation](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/isrotation.md): Returns true if this is a proper rotation.
- [IsValid](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/isvalid.md): Gets a value indicating whether or not this Transform is a valid matrix. A valid transform matrix is not allowed to have any invalid numbers.
- [IsZero](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/iszero.md): True if matrix is Zero4x4, ZeroTransformation, or some other type of zero. The value xform[3][3] can be anything.
- [IsZero4x4](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/iszero4x4.md): True if all values are 0
- [IsZeroTransformation](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/iszerotransformation.md): True if all values are 0, except for M33 which is 1.
- [M00](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/m00.md): Gets or sets this[0,0].
- [M01](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/m01.md): Gets or sets this[0,1].
- [M02](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/m02.md): Gets or sets this[0,2].
- [M03](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/m03.md): Gets or sets this[0,3].
- [M10](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/m10.md): Gets or sets this[1,0].
- [M11](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/m11.md): Gets or sets this[1,1].
- [M12](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/m12.md): Gets or sets this[1,2].
- [M13](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/m13.md): Gets or sets this[1,3].
- [M20](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/m20.md): Gets or sets this[2,0].
- [M21](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/m21.md): Gets or sets this[2,1].
- [M22](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/m22.md): Gets or sets this[2,2].
- [M23](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/m23.md): Gets or sets this[2,3].
- [M30](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/m30.md): Gets or sets this[3,0].
- [M31](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/m31.md): Gets or sets this[3,1].
- [M32](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/m32.md): Gets or sets this[3,2].
- [M33](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/m33.md): Gets or sets this[3,3].
- [RigidType](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/rigidtype.md): Gets a value indicating whether or not the Transform is rigid. A rigid transformation can be broken into a proper rotation and a translation, while an isometry transformation could also include a reflection.
- [SimilarityType](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/similaritytype.md): Gets a value indicating whether or not the Transform maintains similarity. The easiest way to think of Similarity is that any circle, when transformed, remains a circle. Whereas a non-similarity Transform deforms circles into ellipses.
- [Unset](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/unset.md): (static) Gets an XForm filled with RhinoMath.UnsetValue.
- [ZeroTransformation](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/zerotransformation.md): (static) ZeroTransformation diagonal = (0,0,0,1)

## Indexers

- [this[]](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/item.md): Gets or sets the matrix value at the given row and column indices.

## Methods

- [Affineize](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/affineize.md): Replaces the last row with (0 0 0 1), discarding any perspective part of this transform
- [ChangeBasis](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/changebasis.md): (3 overloads, static) Gets a change of basis transformation. The change of basis transformation is not the same as the rotation transformation that rotates one orthonormal frame to another. If you have geometry defined with respect to planes, this method takes two planes and computes the transformation to change coordinates from one plane to another.
- [Clone](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/clone.md): Returns a deep copy of the transform. For languages that treat structures as value types, this can be accomplished by a simple assignment.
- [CompareTo](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/compareto.md): Compares this transform with another transform. M33 has highest value, then M32, etc..
- [DecomposeAffine](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/decomposeaffine.md): (3 overloads) Decomposes an affine transformation. A transformation is affine if it is valid and its last row is [0, 0, 0, 1]. An affine transformation can be broken into a linear transformation and a translation. Note, a perspective transformation is not affine.
- [DecomposeRigid](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/decomposerigid.md): Decomposes a rigid transformation. The transformation must be affine.
- [DecomposeSimilarity](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/decomposesimilarity.md): Decomposes a similarity transformation. The transformation must be affine. A similarity transformation can be broken into a sequence of a dilation, translation, rotation, and a reflection.
- [DecomposeSymmetric](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/decomposesymmetric.md): A Symmetric linear transformation can be decomposed A = Q * Diag * Q ^ T, where Diag is a diagonal transformation. Diag[i][i] is an eigenvalue of A and the i-th column of Q is a corresponding unit length eigenvector. Note, this transformation must be Linear and Symmetric.
- [DecomposeTextureMapping](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/decomposetexturemapping.md): Decomposition of a uvw transform into components
- [Diagonal](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/diagonal.md): (2 overloads, static) Constructs a new transformation with diagonal (d0,d1,d2,1.0).
- [Equals](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/equals.md): (2 overloads) Determines if another object is a transform and its value equals this transform value.
- [GetEulerZYZ](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/geteulerzyz.md): Find the Euler angles for a rotation transformation.
- [GetHashCode](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/gethashcode.md): Gets a non-unique hashing code for this transform.
- [GetQuaternion](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/getquaternion.md): If this transform is a proper rotation, then find the equivalent quaternion.
- [GetYawPitchRoll](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/getyawpitchroll.md): Find the Tait-Byran angles (also loosely called Euler angles) for a rotation transformation.
- [IsRigid](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/isrigid.md): Gets a value indicating whether or not the Transform is rigid. A rigid transformation can be broken into a proper rotation and a translation, while an isometry transformation could also include a reflection.
- [IsSimilarity](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/issimilarity.md): Gets a value indicating whether or not the Transform maintains similarity. A similarity transformation can be broken into a sequence of a dilation, translation, rotation, and a reflection.
- [IsUniformlyScaled](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/isuniformlyscaled.md): Determines if this transform is uniformly scaled - that is, a similarity transformation that scales all directions equally and preserves angles, mapping circles to circles. This includes pure rotations, translations and mirroring.
- [IsZeroTransformationWithTolerance](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/iszerotransformationwithtolerance.md): True if all values are 0 within tolerance, except for M33 which is exactly 1.
- [IsZeroTransformaton](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/iszerotransformaton.md): (obsolete) True if all values are 0 within tolerance, except for M33 which is exactly 1.
- [Linearize](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/linearize.md): Affinitize() and replaces the last column with (0 0 0 1)^T, discarding any translation part of this transform.
- [Mirror](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/mirror.md): (2 overloads, static) Constructs a new Mirror transformation.
- [Multiply](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/multiply.md): (static) Multiplies (combines) two transformations. This is the same as the * operator between two transformations.
- [Orthogonalize](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/orthogonalize.md): Force the linear part of this transformation to be a rotation (or a rotation with reflection). Use DecomposeRigid(T,R) to find the nearest rotation.
- [PlanarProjection](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/planarprojection.md): (static) Constructs a projection transformation.
- [PlaneToPlane](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/planetoplane.md): (static) Create a rotation transformation that orients plane0 to plane1. If you want to orient objects from one plane to another, use this form of transformation.
- [ProjectAlong](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/projectalong.md): (static) Construct a projection onto a plane along a specific direction.
- [Rotation](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/rotation.md): (5 overloads, static) Constructs a new rotation transformation with specified angle and rotation center. The axis of rotation is [Vector3d.ZAxis](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.vector3d/zaxis.md).
- [RotationZYX](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/rotationzyx.md): (static) Create rotation transformation From Tait-Byran angles (also loosely known as Euler angles).
- [RotationZYZ](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/rotationzyz.md): (static) Create rotation transformation From Euler angles.
- [Scale](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/scale.md): (2 overloads, static) Constructs a new non-uniform scaling transformation with a specified scaling anchor point.
- [Shear](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/shear.md): (static) Constructs a Shear transformation.
- [ICloneable.Clone](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/system-icloneable-clone.md)
- [TextureMapping](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/texturemapping.md): (static) Construct a UVW Transform from components.
- [ToDoubleArray](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/todoublearray.md): Return the matrix as a linear array of 16 double values.
- [ToFloatArray](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/tofloatarray.md): Return the matrix as a linear array of 16 float values.
- [ToString](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/tostring.md): Returns a string representation of this transform.
- [TransformBoundingBox](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/transformboundingbox.md): Computes a new bounding box that is the smallest axis aligned bounding box that contains the transformed result of its 8 original corner points.
- [TransformList](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/transformlist.md): Given a list, an array or any enumerable set of points, computes a new array of transformed points.
- [Translation](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/translation.md): (2 overloads, static) Constructs a new translation (move) transformation. Right column is (dx, dy, dz, 1.0).
- [Transpose](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/transpose.md): Flip row/column values
- [TryGetInverse](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/trygetinverse.md): Attempts to get the inverse transform of this transform.

## Operators

- [operator ==](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/op-equality.md): (static) Determines if two transformations are equal in value.
- [operator !=](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/op-inequality.md): (static) Determines if two transformations are different in value.
- [operator *](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.transform/op-multiply.md): (3 overloads, static) Multiplies a transformation by a point and gets a new point.
