3D transformation (3×4 matrix).
``````    [Serializable]
public struct Transform : IEquatable<Transform>
``````

Represents one or many transformations in 3D space such as translation, rotation, or scaling. It consists of a basis and an origin. It is similar to a 3×4 matrix.

### Static Properties

``````    public static  FlipX { get; }
``````

``````    public static  FlipY { get; }
``````

``````    public static  FlipZ { get; }
``````

``````    public static  Identity { get; }
``````

### Constructors

``````    public Transform(Vector3 column0, Vector3 column1, Vector3 column2, Vector3 origin)
``````

Constructs the Transform from four Vector3. Each axis corresponds to local basis vectors (some of which may be scaled).

``````    public Transform(Quat quat, Vector3 origin)
``````

``````    public Transform(Basis basis, Vector3 origin)
``````

Constructs the Transform from a Basis and Vector3.

``````    public Transform()
``````

### Fields

``````    public Basis basis
``````

The basis is a matrix containing 3 Vector3 as its columns: X axis, Y axis, and Z axis. These vectors can be interpreted as the basis vectors of local coordinate system traveling with the object.

``````    public Vector3 origin
``````

The translation offset of the transform.

### Methods

``````    public Transform AffineInverse()
``````

Returns the inverse of the transform, under the assumption that the transformation is composed of rotation, scaling and translation.

``````    public override bool Equals(object obj)
``````

``````    public bool Equals(Transform other)
``````

``````    public override int GetHashCode()
``````

``````    public Transform InterpolateWith(Transform transform, float c)
``````

Interpolates the transform to other Transform by weight amount (0-1).

``````    public Transform Inverse()
``````

Returns the inverse of the transform, under the assumption that the transformation is composed of rotation and translation (no scaling, use affine_inverse for transforms with scaling).

``````    public Transform LookingAt(Vector3 target, Vector3 up)
``````

Returns a copy of the transform rotated such that its -Z axis points towards the `target` position.

The transform will first be rotated around the given `up` vector, and then fully aligned to the target by a further rotation around an axis perpendicular to both the `target` and `up` vectors.

Operations take place in global space.

``````    public Transform Orthonormalized()
``````

Returns the transform with the basis orthogonal (90 degrees), and normalized axis vectors.

``````    public Transform Rotated(Vector3 axis, float phi)
``````

Rotates the transform around given axis by phi. The axis must be a normalized vector.

``````    public Transform Scaled(Vector3 scale)
``````

Scales the transform by the specified 3D scaling factors.

``````    public void SetLookAt(Vector3 eye, Vector3 target, Vector3 up)
``````

``````    public override string ToString()
``````

``````    public string ToString(string format)
``````

``````    public Transform Translated(Vector3 ofs)
``````

Translates the transform by the specified offset.

``````    public Vector3 Xform(Vector3 v)
``````

``````    public Vector3 XformInv(Vector3 v)
``````

### Operators

``````    public static bool operator ==(Transform left, Transform right)
``````

``````    public static bool operator !=(Transform left, Transform right)
``````

``````    public static Transform operator *(Transform left, Transform right)
``````
Tags: