T_Rhino_Geometry_Transform - mcneel/rhinocommon-api-docs GitHub Wiki

Transform Structure

Represents the values in a 4x4 transform matrix. This is parallel to C++ ON_Xform.

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

Syntax

C#

[SerializableAttribute]
public struct Transform : IComparable<Transform>, 
	IEquatable<Transform>

VB

<SerializableAttribute>
Public Structure Transform
	Implements IComparable(Of Transform), IEquatable(Of Transform)

The Transform type exposes the following members.

Constructors

 

Name Description
Public method Transform Initializes a new transform matrix with a specified value along the diagonal.
  Back to Top

Properties

 

Name Description
Public property Determinant The determinant of this 4x4 matrix.
Public propertyStatic member Identity Gets a new identity transform matrix. An identity matrix defines no transformation.
Public property IsIdentity Return true if this Transform is the identity transform
Public property IsValid 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.
Public property Item Gets or sets the matrix value at the given row and column indixes.
Public property M00 Gets or sets this[0,0].
Public property M01 Gets or sets this[0,1].
Public property M02 Gets or sets this[0,2].
Public property M03 Gets or sets this[0,3].
Public property M10 Gets or sets this[1,0].
Public property M11 Gets or sets this[1,1].
Public property M12 Gets or sets this[1,2].
Public property M13 Gets or sets this[1,3].
Public property M20 Gets or sets this[2,0].
Public property M21 Gets or sets this[2,1].
Public property M22 Gets or sets this[2,2].
Public property M23 Gets or sets this[2,3].
Public property M30 Gets or sets this[3,0].
Public property M31 Gets or sets this[3,1].
Public property M32 Gets or sets this[3,2].
Public property M33 Gets or sets this[3,3].
Public property SimilarityType 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.
Public propertyStatic member Unset Gets an XForm filled with RhinoMath.UnsetValue.
  Back to Top

Methods

 

Name Description
Public methodStatic member ChangeBasis(Plane, Plane) Computes a change of basis transformation. A basis change is essentially a remapping of geometry from one coordinate system to another.
Public methodStatic member ChangeBasis(Vector3d, Vector3d, Vector3d, Vector3d, Vector3d, Vector3d) Computes a change of basis transformation. A basis change is essentially a remapping of geometry from one coordinate system to another.
Public method CompareTo Compares this transform with another transform. M33 has highest value, then M32, etc..
Public method Equals(Object) Determines if another object is a transform and its value equals this transform value. (Overrides ValueType.Equals(Object).)
Public method Equals(Transform) Determines if another transform equals this transform value.
Public method GetHashCode Gets a non-unique hashing code for this transform. (Overrides ValueType.GetHashCode().)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public methodStatic member Mirror(Plane) Constructs a new Mirror transformation.
Public methodStatic member Mirror(Point3d, Vector3d) Create mirror transformation matrix The mirror transform maps a point Q to Q - (2*(Q-P)oN)*N, where P = pointOnMirrorPlane and N = normalToMirrorPlane.
Public methodStatic member Multiply Multiplies (combines) two transformations. This is the same as the * operator between two transformations.
Public methodStatic member PlanarProjection Constructs a projection transformation.
Public methodStatic memberCode example PlaneToPlane
Public methodStatic member ProjectAlong Construct a projection onto a plane along a specific direction.
Public methodStatic member Rotation(Double, Point3d) Constructs a new rotation transformation with specified angle and rotation center.
Public methodStatic member Rotation(Double, Vector3d, Point3d) Constructs a new rotation transformation with specified angle, rotation center and rotation axis.
Public methodStatic member Rotation(Vector3d, Vector3d, Point3d) Constructs a new rotation transformation with start and end directions and rotation center.
Public methodStatic member Rotation(Double, Double, Vector3d, Point3d) Constructs a new rotation transformation with specified angle, rotation center and rotation axis.
Public methodStatic member Rotation(Vector3d, Vector3d, Vector3d, Vector3d, Vector3d, Vector3d) Constructs a transformation that maps X0 to X1, Y0 to Y1, Z0 to Z1.
Public methodStatic member Scale(Point3d, Double) Constructs a new uniform scaling transformation with a specified scaling anchor point.
Public methodStatic member Scale(Plane, Double, Double, Double) Constructs a new non-uniform scaling transformation with a specified scaling anchor point.
Public methodStatic member Shear Constructs a Shear transformation.
Public method ToFloatArray Return the matrix as a linear array of 16 float values
Public method ToString Returns a string representation of this transform. (Overrides ValueType.ToString().)
Public method TransformBoundingBox Computes a new boundingbox that is the smallest axis aligned boundingbox that contains the transformed result of its 8 original corner points.
Public method TransformList Given a list, an array or any enumerable set of points, computes a new array of tranformed points.
Public methodStatic memberCode example Translation(Vector3d) Constructs a new translation (move) transformation.
Public methodStatic memberCode example Translation(Double, Double, Double) Constructs a new translation (move) tranformation. Right column is (dx, dy, dz, 1.0).
Public method Transpose Flip row/column values
Public method TryGetInverse Attempts to get the inverse transform of this transform.
  Back to Top

Operators

 

Name Description
Public operatorStatic member Equality Determines if two transformations are equal in value.
Public operatorStatic member Inequality Determines if two transformations are different in value.
Public operatorStatic member Multiply(Transform, Point3d) Multiplies a transformation by a point and gets a new point.
Public operatorStatic member Multiply(Transform, Transform) Multiplies (combines) two transformations.
Public operatorStatic member Multiply(Transform, Vector3d) Multiplies a transformation by a vector and gets a new vector.
  Back to Top

Version Information

Supported in: 6.0.16224.21491, 5D58w

See Also

Reference

Rhino.Geometry Namespace

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