Transform

References
[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

#Since v5.0
public Transform(double diagonalValue)
Initializes a new transform matrix with a specified value along the diagonal.
diagonalValue (double)Value to assign to all diagonal cells except M33 which is set to 1.0.

Transform

#Since v6.0
public Transform(Transform value)
Initializes a new transform matrix with a specified value.
value (Transform)Value to assign to all cells.

Properties

Determinant

#Since v5.0
public double Determinant { get; }
The determinant of this 4x4 matrix.

Identity

#Since v5.0
public static Transform Identity { get; }
Gets a new identity transform matrix. An identity matrix defines no transformation.

IsAffine

#Since v6.12
public bool IsAffine { get; }
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

#Since v6.0
public bool IsIdentity { get; }
Return true if this Transform is the identity transform

IsLinear

#Since v6.12
public bool IsLinear { get; }
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

#Since v6.12
public bool IsRotation { get; }
Returns true if this is a proper rotation.

IsValid

#Since v5.0
public bool IsValid { get; }
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

#Since v6.1
public bool IsZero { get; }
True if matrix is Zero4x4, ZeroTransformation, or some other type of zero. The value xform[3][3] can be anything.

IsZero4x4

#Since v6.1
public bool IsZero4x4 { get; }
True if all values are 0

IsZeroTransformation

#Since v6.1
public bool IsZeroTransformation { get; }
True if all values are 0, except for M33 which is 1.

M00

#Since v5.0
public double M00 { get; set; }
Gets or sets this[0,0].

M01

#Since v5.0
public double M01 { get; set; }
Gets or sets this[0,1].

M02

#Since v5.0
public double M02 { get; set; }
Gets or sets this[0,2].

M03

#Since v5.0
public double M03 { get; set; }
Gets or sets this[0,3].

M10

#Since v5.0
public double M10 { get; set; }
Gets or sets this[1,0].

M11

#Since v5.0
public double M11 { get; set; }
Gets or sets this[1,1].

M12

#Since v5.0
public double M12 { get; set; }
Gets or sets this[1,2].

M13

#Since v5.0
public double M13 { get; set; }
Gets or sets this[1,3].

M20

#Since v5.0
public double M20 { get; set; }
Gets or sets this[2,0].

M21

#Since v5.0
public double M21 { get; set; }
Gets or sets this[2,1].

M22

#Since v5.0
public double M22 { get; set; }
Gets or sets this[2,2].

M23

#Since v5.0
public double M23 { get; set; }
Gets or sets this[2,3].

M30

#Since v5.0
public double M30 { get; set; }
Gets or sets this[3,0].

M31

#Since v5.0
public double M31 { get; set; }
Gets or sets this[3,1].

M32

#Since v5.0
public double M32 { get; set; }
Gets or sets this[3,2].

M33

#Since v5.0
public double M33 { get; set; }
Gets or sets this[3,3].

RigidType

#Since v6.12
public TransformRigidType RigidType { get; }
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

#Since v5.0
public TransformSimilarityType SimilarityType { get; }
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

#Since v5.0
public static Transform Unset { get; }
Gets an XForm filled with RhinoMath.UnsetValue.

ZeroTransformation

#Since v6.1
public static Transform ZeroTransformation { get; }
ZeroTransformation diagonal = (0,0,0,1)

Indexers

this[]

#
public double this[int row, int column] { get; set; }
Gets or sets the matrix value at the given row and column indices.
The new value at [row, column]
row (int)Index of row to access, must be 0, 1, 2 or 3.
column (int)Index of column to access, must be 0, 1, 2 or 3.
The value at [row, column]

Methods

Affineize

#Since v6.12
public void Affineize()
Replaces the last row with (0 0 0 1), discarding any perspective part of this transform

ChangeBasis

#Since v5.0
public static Transform ChangeBasis(Plane plane0, Plane plane1)
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.
Remarks: Change of basis transformations and rotation transformations are often confused. This is a change of basis transformation. If Q = P0 + a0*X0 + b0*Y0 + c0*Z0 = P1 + a1*X1 + b1*Y1 + c1*Z1, then this transform will map the coordinates (a0,b0,c0) to (a1,b1,c1).
plane0 (Plane)Coordinate system in which the geometry is currently described.
plane1 (Plane)Target coordinate system in which we want the geometry to be described.
A change of basis transformation if success, Unset on failure.

ChangeBasis

#Since v8.17
public static Transform ChangeBasis(Point3d P0, Vector3d X0, Vector3d Y0, Vector3d Z0, Point3d P1, Vector3d X1, Vector3d Y1, Vector3d Z1)
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.
Remarks: Change of basis transformations and rotation transformations are often confused. This is a change of basis transformation. If Q = P0 + a0*X0 + b0*Y0 + c0*Z0 = P1 + a1*X1 + b1*Y1 + c1*Z1, then this transform will map the point (a0,b0,c0) to (a1,b1,c1).
P0 (Point3d)Initial center.
X0 (Vector3d)Initial basis X (can be any 3d basis).
Y0 (Vector3d)Initial basis Y (can be any 3d basis).
Z0 (Vector3d)Initial basis Z (can be any 3d basis).
P1 (Point3d)Final center.
X1 (Vector3d)Final basis X (can be any 3d basis).
Y1 (Vector3d)Final basis Y (can be any 3d basis).
Z1 (Vector3d)Final basis Z (can be any 3d basis).
A change of basis transformation if success, Unset on failure.

ChangeBasis

#Since v5.0
public static Transform ChangeBasis(Vector3d X0, Vector3d Y0, Vector3d Z0, Vector3d X1, Vector3d Y1, Vector3d Z1)
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.
Remarks: Change of basis transformations and rotation transformations are often confused. This is a change of basis transformation. If Q = a0*X0 + b0*Y0 + c0*Z0 = a1*X1 + b1*Y1 + c1*Z1, then this transform will map the point (a0,b0,c0) to (a1,b1,c1).
X0 (Vector3d)Initial basis X (can be any 3d basis).
Y0 (Vector3d)Initial basis Y (can be any 3d basis).
Z0 (Vector3d)Initial basis Z (can be any 3d basis).
X1 (Vector3d)Final basis X (can be any 3d basis).
Y1 (Vector3d)Final basis Y (can be any 3d basis).
Z1 (Vector3d)Final basis Z (can be any 3d basis).
A change of basis transformation if success, Unset on failure.

Clone

#Since v6.0
[ConstOperation] public Transform Clone()
Returns a deep copy of the transform. For languages that treat structures as value types, this can be accomplished by a simple assignment.
A deep copy of this data structure.

CompareTo

#Since v5.0
[ConstOperation] public int CompareTo(Transform other)
Compares this transform with another transform.

M33 has highest value, then M32, etc..

other (Transform)Another transform.
-1 if this < other; 0 if both are equal; 1 otherwise.

DecomposeAffine

#Since v6.12
[ConstOperation] public bool DecomposeAffine(out Transform linear, out Vector3d translation)
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.
Remarks: If X.DecomposeAffine(L, T) is true then X == L* Translation(T). DecomposeAffine(L, T) may fail for affine transformations if L is not invertible, and is more computationally expensive then X.DecomposeAffine(T, L).
linear (out Transform)Linear transformation.
translation (out Vector3d)Translation vector.
True if successful decomposition.

DecomposeAffine

#Since v6.12
[ConstOperation] public bool DecomposeAffine(out Vector3d translation, out Transform linear)
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.
Remarks: If X.DecomposeAffine(T, L) is true then X == Translation(T)*L. DecomposeAffine(T,L) succeeds for all affine transformations and is a simple copying of values.
translation (out Vector3d)Translation vector.
linear (out Transform)Linear transformation.
True if successful decomposition.

DecomposeAffine

#Since v6.12
[ConstOperation] public bool DecomposeAffine(out Vector3d translation, out Transform rotation, out Transform orthogonal, out Vector3d diagonal)
An affine transformation can be decomposed into a Symmetric, Rotation and Translation. Then the Symmetric component may be further decomposed as non-uniform scale in an orthonormal coordinate system.
translation (out Vector3d)Translation vector.
rotation (out Transform)Proper rotation transformation.
orthogonal (out Transform)Orthogonal basis.
diagonal (out Vector3d)Diagonal elements of a Diagonal transformation.
True if successful decomposition.

DecomposeRigid

#Since v6.12
[ConstOperation] public TransformRigidType DecomposeRigid(out Vector3d translation, out Transform rotation, double tolerance)
Decomposes a rigid transformation. The transformation must be affine.
Remarks: If X.DecomposeRigid(T, R) is 1, then X ~ Translation(T)*R. If X.DecomposeRigid(T, R) is -1, then X ~ Transform(-1) * Translation(T)*R. DecomposeRigid will find the closest rotation to the linear part of this transformation.
translation (out Vector3d)Translation vector.
rotation (out Transform)Proper rotation transformation, where R*Transpose(R)=I and det(R)=1.
tolerance (double)The evaluation tolerance.
The rigid type.

DecomposeSimilarity

#Since v6.12
[ConstOperation] public TransformSimilarityType DecomposeSimilarity(out Vector3d translation, out double dilation, out Transform rotation, double tolerance)
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.
Remarks: If X.DecomposeSimilarity(T, d, R, tol) !=0 then X ~ Translation(T)*Diagonal(d)*R note when d gt;0 the transformation is orientation preserving. If dilation lt; 0 then Diagonal(dilation) is actually a reflection combined with a true dilation, or Diagonal(dilation) = Diagonal(-1) * Diagonal(|diagonal|).
translation (out Vector3d)Translation vector.
dilation (out double)Dilation, where dilation lt; 0 if this is an orientation reversing similarity.
rotation (out Transform)A proper rotation transformation, where R*Transpose(R)=I and Determinant(R)=1.
tolerance (double)The evaluation tolerance.
The similarity type.

DecomposeSymmetric

#Since v6.12
[ConstOperation] public bool DecomposeSymmetric(out Transform matrix, out Vector3d diagonal)
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.
Remarks: If success, this== Q*Diagonal(diagonal) * QT, where QT == Q.Transpose(). If L.IsLinear and LT==L.Transpose then LT*L is symmetric and is a common source of symmetric transformations.
matrix (out Transform)An orthonormal matrix of eigenvectors (Q).
diagonal (out Vector3d)A vector of eigenvalues.
true if successful, false otherwise.

DecomposeTextureMapping

#Since v8.0
[ConstOperation] public void DecomposeTextureMapping(out Vector3d offset, out Vector3d repeat, out Vector3d rotation)
Decomposition of a uvw transform into components
offset (out Vector3d)Offset
repeat (out Vector3d)Repear
rotation (out Vector3d)Rotation

Diagonal

#Since v6.12
public static Transform Diagonal(double d0, double d1, double d2)
Constructs a new transformation with diagonal (d0,d1,d2,1.0).
d0 (double)Transform.M00 value.
d1 (double)Transform.M11 value.
d2 (double)Transform.M22 value.
A transformation with diagonal (d0,d1,d2,1.0).

Diagonal

#Since v6.12
public static Transform Diagonal(Vector3d diagonal)
Constructs a new transformation with diagonal (d0,d1,d2,1.0).
diagonal (Vector3d)The diagonal values.
A transformation with diagonal (d0,d1,d2,1.0).

Equals

#
[ConstOperation] public override bool Equals(object obj)
Determines if another object is a transform and its value equals this transform value.
obj (object)Another object.
true if obj is a transform and has the same value as this transform; otherwise, false.
ValueType.Equals

Equals

#Since v5.0
[ConstOperation] public bool Equals(Transform other)
Determines if another transform equals this transform value.
other (Transform)Another transform.
true if other has the same value as this transform; otherwise, false.

GetEulerZYZ

#Since v6.11
[ConstOperation] public bool GetEulerZYZ(out double alpha, out double beta, out double gamma)
Find the Euler angles for a rotation transformation.
Remarks: Note, alpha and gamma are in the range (-pi, pi] while beta in the range [0, pi]
alpha (out double)Angle of rotation, in radians, about the Z axis.
beta (out double)Angle of rotation, in radians, about the Y axis.
gamma (out double)Angle of rotation, in radians, about the Z axis.
If true, then this = RotationZYZ(alpha, beta, gamma) = R_z(alpha) * R_y(beta) * R_z(gamma) where R_*(angle) is rotation of angle radians about the corresponding *-world coordinate axis. If false, then this is not a rotation.

GetHashCode

#
[ConstOperation] public override int GetHashCode()
Gets a non-unique hashing code for this transform.
A number that can be used to hash this transform in a dictionary.

GetQuaternion

#Since v7.12
public bool GetQuaternion(out Quaternion quaternion)
If this transform is a proper rotation, then find the equivalent quaternion.
quaternion (out Quaternion)Quaternion that represents this rotation transformation.
true if this transform is a proper rotation, false otherwise.

GetYawPitchRoll

#Since v6.11
[ConstOperation] public bool GetYawPitchRoll(out double yaw, out double pitch, out double roll)
Find the Tait-Byran angles (also loosely called Euler angles) for a rotation transformation.
yaw (out double)Angle of rotation, in radians, about the Z axis.
pitch (out double)Angle of rotation, in radians, about the Y axis.
roll (out double)Angle of rotation, in radians, about the X axis.
If true, then this = RotationZYX(yaw, pitch, roll) = R_z(yaw) * R_y(pitch) * R_x(roll) where R_*(angle) is rotation of angle radians about the corresponding world coordinate axis. If false, then this is not a rotation.

IsRigid

#Since v6.12
[ConstOperation] public TransformRigidType IsRigid(double tolerance)
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.
tolerance (double)The evaluation tolerance.
The rigid type.

IsSimilarity

#Since v6.12
[ConstOperation] public TransformSimilarityType IsSimilarity(double tolerance)
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.
tolerance (double)The evaluation tolerance.
The similarity type.

IsUniformlyScaled

#Since v9.0
[ConstOperation] public bool IsUniformlyScaled()
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.
True if uniformly scaled, false otherwise.

IsZeroTransformationWithTolerance

#Since v7.1
[ConstOperation] public bool IsZeroTransformationWithTolerance(double zeroTolerance)
True if all values are 0 within tolerance, except for M33 which is exactly 1.
zeroTolerance (double)The tolerance for 0 elements.
True if the transformation matrix is ON_Xform::ZeroTransformation, with xform[3][3] equal to 1: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 An element x of the matrix is "zero" if fabs(x) ≤ zeroTolerance. IsZeroTransformation is the same as IsZeroTransformationWithTolerance(0.0)

IsZeroTransformaton

#Since v6.12 Obsolete v7.1
[EditorBrowsable(EditorBrowsableState.Never)] [ConstOperation] public bool IsZeroTransformaton(double zeroTolerance)
obsoleteThis method remains with a typo in its name for backwards compatibility. Use IsZeroTransformationWithTolerance instead.
True if all values are 0 within tolerance, except for M33 which is exactly 1.
zeroTolerance (double)The zero tolerance.
Returns true if all values are 0 within tolerance, except for M33 which is exactly 1.

Linearize

#Since v6.12
public void Linearize()
Affinitize() and replaces the last column with (0 0 0 1)^T, discarding any translation part of this transform.

Mirror

#Since v5.0
public static Transform Mirror(Plane mirrorPlane)
Constructs a new Mirror transformation.
mirrorPlane (Plane)Plane that defines the mirror orientation and position.
A transformation matrix which mirrors geometry in a specified plane.

Mirror

#Since v5.0
public static Transform Mirror(Point3d pointOnMirrorPlane, Vector3d normalToMirrorPlane)
Create mirror transformation matrix The mirror transform maps a point Q to Q - (2*(Q-P)oN)*N, where P = pointOnMirrorPlane and N = normalToMirrorPlane.
pointOnMirrorPlane (Point3d)Point on the mirror plane.
normalToMirrorPlane (Vector3d)Normal vector to the mirror plane.
A transformation matrix which mirrors geometry in a specified plane.

Multiply

#Since v5.0
public static Transform Multiply(Transform a, Transform b)
Multiplies (combines) two transformations.

This is the same as the * operator between two transformations.

a (Transform)First transformation.
b (Transform)Second transformation.
A transformation matrix that combines the effect of both input transformations. The resulting Transform gives the same result as though you'd first apply B then A.

Orthogonalize

#Since v6.12
public bool Orthogonalize(double tolerance)
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.
tolerance (double)The evaluation tolerance
true if successful, false otherwise.

PlanarProjection

#Since v5.0
public static Transform PlanarProjection(Plane plane)
Constructs a projection transformation.
plane (Plane)Plane onto which everything will be perpendicularly projected.
A transformation matrix which projects geometry onto a specified plane.

PlaneToPlane

#Since v5.0
public static Transform PlaneToPlane(Plane plane0, Plane plane1)
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.
plane0 (Plane)The plane to orient from.
plane1 (Plane)the plane to orient to.
The translation transformation if successful, Transform.Unset on failure.

ProjectAlong

#Since v6.0
public static Transform ProjectAlong(Plane plane, Vector3d direction)
Construct a projection onto a plane along a specific direction.
plane (Plane)Plane to project onto.
direction (Vector3d)Projection direction, must not be parallel to the plane.
Projection transformation or identity transformation if projection could not be calculated.

Rotation

#Since v5.0
public static Transform Rotation(double angleRadians, Point3d rotationCenter)
Constructs a new rotation transformation with specified angle and rotation center. The axis of rotation is Vector3d.ZAxis.
angleRadians (double)Rotation angle in radians.
rotationCenter (Point3d)3D center of rotation.
A rotation transformation matrix.

Rotation

#Since v5.0
public static Transform Rotation(double angleRadians, Vector3d rotationAxis, Point3d rotationCenter)
Constructs a new rotation transformation with specified angle, rotation center and rotation axis.
angleRadians (double)Rotation angle in radians.
rotationAxis (Vector3d)3D unit axis of rotation.
rotationCenter (Point3d)3D center of rotation.
A rotation transformation matrix.

Rotation

#Since v5.0
public static Transform Rotation(double sinAngle, double cosAngle, Vector3d rotationAxis, Point3d rotationCenter)
Constructs a new rotation transformation with specified angle, rotation center and rotation axis.
sinAngle (double)Sine of the rotation angle.
cosAngle (double)Cosine of the rotation angle.
rotationAxis (Vector3d)3D unit axis of rotation.
rotationCenter (Point3d)3D center of rotation.
A rotation transformation matrix.

Rotation

#Since v5.0
public static Transform Rotation(Vector3d startDirection, Vector3d endDirection, Point3d rotationCenter)
Constructs a new rotation transformation with start and end directions and rotation center.
startDirection (Vector3d)A start direction.
endDirection (Vector3d)An end direction.
rotationCenter (Point3d)3D center of rotation.
A rotation transformation matrix.

Rotation

#Since v5.0
public static Transform Rotation(Vector3d x0, Vector3d y0, Vector3d z0, Vector3d x1, Vector3d y1, Vector3d z1)
Constructs a transformation that maps X0 to X1, Y0 to Y1, Z0 to Z1. The frames should be right hand orthonormal frames (unit vectors with Z = X x Y). The resulting rotation fixes the origin (0,0,0), maps initial X to final X, initial Y to final Y, and initial Z to final Z.
x0 (Vector3d)Initial frame X.
y0 (Vector3d)Initial frame Y.
z0 (Vector3d)Initial frame Z.
x1 (Vector3d)Final frame X.
y1 (Vector3d)Final frame Y.
z1 (Vector3d)Final frame Z.
A rotation transformation matrix.

RotationZYX

#Since v6.11
public static Transform RotationZYX(double yaw, double pitch, double roll)
Create rotation transformation From Tait-Byran angles (also loosely known as Euler angles).
Remarks: RotationZYX(yaw, pitch, roll) = R_z(yaw) * R_y(pitch) * R_x(roll) where R_*(angle) is rotation of angle radians about the corresponding world coordinate axis.
yaw (double)Angle, in radians, to rotate about the Z axis.
pitch (double)Angle, in radians, to rotate about the Y axis.
roll (double)Angle, in radians, to rotate about the X axis.
A transform matrix from Tait-Byran angles.

RotationZYZ

#Since v6.11
public static Transform RotationZYZ(double alpha, double beta, double gamma)
Create rotation transformation From Euler angles.
Remarks: RotationZYZ(alpha, beta, gamma) = R_z(alpha) * R_y(beta) * R_z(gamma) where R_*(angle) is rotation of angle radians about the corresponding *-world coordinate axis. Note, alpha and gamma are in the range (-pi, pi] while beta in the range [0, pi]
alpha (double)Angle, in radians, to rotate about the Z axis.
beta (double)Angle, in radians, to rotate about the Y axis.
gamma (double)Angle, in radians, to rotate about the X axis.
A transform matrix from Euler angles.

Scale

#Since v5.0
public static Transform Scale(Plane plane, double xScaleFactor, double yScaleFactor, double zScaleFactor)
Constructs a new non-uniform scaling transformation with a specified scaling anchor point.
plane (Plane)Defines the center and orientation of the scaling operation.
xScaleFactor (double)Scaling factor along the anchor plane X-Axis direction.
yScaleFactor (double)Scaling factor along the anchor plane Y-Axis direction.
zScaleFactor (double)Scaling factor along the anchor plane Z-Axis direction.
A transformation matrix which scales geometry non-uniformly.

Scale

#Since v5.0
public static Transform Scale(Point3d anchor, double scaleFactor)
Constructs a new uniform scaling transformation with a specified scaling anchor point.
anchor (Point3d)Defines the anchor point of the scaling operation.
scaleFactor (double)Scaling factor in all directions.
A transform matrix which scales geometry uniformly around the anchor point.

Shear

#Since v5.0
public static Transform Shear(Plane plane, Vector3d x, Vector3d y, Vector3d z)
Constructs a Shear transformation.
plane (Plane)Base plane for shear.
x (Vector3d)Shearing vector along plane x-axis.
y (Vector3d)Shearing vector along plane y-axis.
z (Vector3d)Shearing vector along plane z-axis.
A transformation matrix which shear geometry.
Explicit

ICloneable.Clone

#Since v6.0

TextureMapping

#Since v8.0
public static Transform TextureMapping(Vector3d offset, Vector3d repeat, Vector3d rotation)
Construct a UVW Transform from components.
offset (Vector3d)
repeat (Vector3d)
rotation (Vector3d)

ToDoubleArray

#Since v8.0
[ConstOperation] public double[] ToDoubleArray(bool rowDominant)
Return the matrix as a linear array of 16 double values.
rowDominant (bool)If true, returns { M00, M01, M02...}. If false, returns { M00, M10, M20...}.
An array of 16 doubles.

ToFloatArray

#Since v5.9
[ConstOperation] public float[] ToFloatArray(bool rowDominant)
Return the matrix as a linear array of 16 float values.
rowDominant (bool)If true, returns { M00, M01, M02...}. If false, returns { M00, M10, M20...}.
An array of 16 floats.

ToString

#
[ConstOperation] public override string ToString()
Returns a string representation of this transform.
A textual representation.

TransformBoundingBox

#Since v5.0
[ConstOperation] public BoundingBox TransformBoundingBox(BoundingBox bbox)
Computes a new bounding box that is the smallest axis aligned bounding box that contains the transformed result of its 8 original corner points.
bbox (BoundingBox)
A new bounding box.

TransformList

#Since v5.0
[ConstOperation] public Point3d[] TransformList(IEnumerable<Point3d> points)
Given a list, an array or any enumerable set of points, computes a new array of transformed points.
points (IEnumerable<Point3d>)A list, an array or any enumerable set of points to be left untouched and copied.
A new array.

Translation

#ExampleSince v5.0
public static Transform Translation(double dx, double dy, double dz)
Constructs a new translation (move) transformation. Right column is (dx, dy, dz, 1.0).
dx (double)Distance to translate (move) geometry along the world X axis.
dy (double)Distance to translate (move) geometry along the world Y axis.
dz (double)Distance to translate (move) geometry along the world Z axis.
A transform matrix which moves geometry with the specified distances.

Translation

#ExampleSince v5.0
public static Transform Translation(Vector3d motion)
Constructs a new translation (move) transformation.
motion (Vector3d)Translation (motion) vector.
A transform matrix which moves geometry along the motion vector.

Transpose

#Since v5.9
[ConstOperation] public Transform Transpose()
Flip row/column values

TryGetInverse

#Since v5.0
[ConstOperation] public bool TryGetInverse(out Transform inverseTransform)
Attempts to get the inverse transform of this transform.
inverseTransform (out Transform)The inverse transform. This out reference will be assigned during this call.
true on success. If false is returned and this Transform is Invalid, inserveTransform will be set to this Transform. If false is returned and this Transform is Valid, inverseTransform will be set to a pseudo inverse.

Operators

OperationResultDescription
Transform==TransformboolDetermines if two transformations are equal in value.
Transform!=TransformboolDetermines if two transformations are different in value.
Transform*Point3dPoint3dMultiplies a transformation by a point and gets a new point.
Transform*TransformTransformMultiplies (combines) two transformations.
Transform*Vector3dVector3dMultiplies a transformation by a vector and gets a new vector.