Transform Structure

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)
Syntax
[SerializableAttribute]
public struct Transform : IComparable<Transform>, 
	IEquatable<Transform>
<SerializableAttribute>
Public Structure Transform
	Implements IComparable(Of Transform), IEquatable(Of Transform)

The Transform type exposes the following members.

Constructors
  NameDescription
Public methodTransform(Double)
Initializes a new transform matrix with a specified value along the diagonal.
Public methodTransform(Transform)
Initializes a new transform matrix with a specified value.
Top
Properties
  NameDescription
Public propertyDeterminant
The determinant of this 4x4 matrix.
Public propertyStatic memberIdentity
Gets a new identity transform matrix. An identity matrix defines no transformation.
Public propertyIsIdentity
Return true if this Transform is the identity transform
Public propertyIsValid
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 propertyIsZero
True if matrix is Zero4x4, ZeroTransformation, or some other type of zero.The value xform[3][3] can be anything.
Public propertyIsZero4x4
True if all values are 0
Public propertyIsZeroTransformation
True if all values are 0 and M33 is 1
Public propertyItem
Gets or sets the matrix value at the given row and column indixes.
Public propertyM00
Gets or sets this[0,0].
Public propertyM01
Gets or sets this[0,1].
Public propertyM02
Gets or sets this[0,2].
Public propertyM03
Gets or sets this[0,3].
Public propertyM10
Gets or sets this[1,0].
Public propertyM11
Gets or sets this[1,1].
Public propertyM12
Gets or sets this[1,2].
Public propertyM13
Gets or sets this[1,3].
Public propertyM20
Gets or sets this[2,0].
Public propertyM21
Gets or sets this[2,1].
Public propertyM22
Gets or sets this[2,2].
Public propertyM23
Gets or sets this[2,3].
Public propertyM30
Gets or sets this[3,0].
Public propertyM31
Gets or sets this[3,1].
Public propertyM32
Gets or sets this[3,2].
Public propertyM33
Gets or sets this[3,3].
Public propertySimilarityType
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 memberUnset
Gets an XForm filled with RhinoMath.UnsetValue.
Public propertyStatic memberZeroTransformation
ZeroTransformation diagonal = (0,0,0,1)
Top
Methods
  NameDescription
Public methodStatic memberChangeBasis(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 memberChangeBasis(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 methodClone
Returns a deep copy of the transform. For languages that treat structures as value types, this can be accomplished by a simple assignment.
Public methodCompareTo
Compares this transform with another transform.

M33 has highest value, then M32, etc..

Public methodEquals(Object)
Determines if another object is a transform and its value equals this transform value.
(Overrides ValueTypeEquals(Object).)
Public methodEquals(Transform)
Determines if another transform equals this transform value.
Public methodGetHashCode
Gets a non-unique hashing code for this transform.
(Overrides ValueTypeGetHashCode.)
Public methodGetType (Inherited from Object.)
Public methodStatic memberMirror(Plane)
Constructs a new Mirror transformation.
Public methodStatic memberMirror(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 memberMultiply
Multiplies (combines) two transformations.

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

Public methodStatic memberPlanarProjection
Constructs a projection transformation.
Public methodStatic memberPlaneToPlane
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.
Public methodStatic memberProjectAlong
Construct a projection onto a plane along a specific direction.
Public methodStatic memberRotation(Double, Point3d)
Constructs a new rotation transformation with specified angle and rotation center.
Public methodStatic memberRotation(Double, Vector3d, Point3d)
Constructs a new rotation transformation with specified angle, rotation center and rotation axis.
Public methodStatic memberRotation(Vector3d, Vector3d, Point3d)
Constructs a new rotation transformation with start and end directions and rotation center.
Public methodStatic memberRotation(Double, Double, Vector3d, Point3d)
Constructs a new rotation transformation with specified angle, rotation center and rotation axis.
Public methodStatic memberRotation(Vector3d, Vector3d, Vector3d, Vector3d, Vector3d, Vector3d)
Constructs a transformation that maps X0 to X1, Y0 to Y1, Z0 to Z1.
Public methodStatic memberScale(Point3d, Double)
Constructs a new uniform scaling transformation with a specified scaling anchor point.
Public methodStatic memberScale(Plane, Double, Double, Double)
Constructs a new non-uniform scaling transformation with a specified scaling anchor point.
Public methodStatic memberShear
Constructs a Shear transformation.
Public methodToFloatArray
Return the matrix as a linear array of 16 float values
Public methodToString
Returns a string representation of this transform.
(Overrides ValueTypeToString.)
Public methodTransformBoundingBox
Computes a new boundingbox that is the smallest axis aligned boundingbox that contains the transformed result of its 8 original corner points.
Public methodTransformList
Given a list, an array or any enumerable set of points, computes a new array of tranformed points.
Public methodStatic memberCode exampleTranslation(Vector3d)
Constructs a new translation (move) transformation.
Public methodStatic memberCode exampleTranslation(Double, Double, Double)
Constructs a new translation (move) tranformation. Right column is (dx, dy, dz, 1.0).
Public methodTranspose
Flip row/column values
Public methodTryGetInverse
Attempts to get the inverse transform of this transform.
Top
Operators
  NameDescription
Public operatorStatic memberEquality
Determines if two transformations are equal in value.
Public operatorStatic memberInequality
Determines if two transformations are different in value.
Public operatorStatic memberMultiply(Transform, Point3d)
Multiplies a transformation by a point and gets a new point.
Public operatorStatic memberMultiply(Transform, Transform)
Multiplies (combines) two transformations.
Public operatorStatic memberMultiply(Transform, Vector3d)
Multiplies a transformation by a vector and gets a new vector.
Top
Version Information

Rhino for Mac

Supported in: 5.4

Rhino for Windows

Supported in: 6.8
See Also