docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct RigidTransform

    A rigid transformation type.

    Inherited Members
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetType()
    Namespace: Unity.Mathematics
    Assembly: solution.dll
    Syntax
    [Serializable]
    public struct RigidTransform

    Constructors

    Name Description
    RigidTransform(float3x3, float3)

    Constructs a RigidTransform from a rotation represented by a float3x3 matrix and a translation represented by a float3 vector.

    RigidTransform(float4x4)

    Constructs a RigidTransform from a float4x4. Assumes the matrix is orthonormal.

    RigidTransform(quaternion, float3)

    Constructs a RigidTransform from a rotation represented by a unit quaternion and a translation represented by a float3 vector.

    Fields

    Name Description
    identity

    A RigidTransform representing the identity transform.

    pos

    The translation part of the rigid transformation.

    rot

    The rotation part of the rigid transformation.

    Methods

    Name Description
    AxisAngle(float3, float)

    Returns a RigidTransform representing a rotation around a unit axis by an angle in radians. The rotation direction is clockwise when looking along the rotation axis towards the origin.

    Equals(object)

    Returns true if the RigidTransform is equal to a given RigidTransform, false otherwise.

    Equals(RigidTransform)

    Returns true if the RigidTransform is equal to a given RigidTransform, false otherwise.

    Euler(float, float, float, RotationOrder)

    Returns a RigidTransform constructed by first performing 3 rotations around the principal axes in a given order. All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. When the rotation order is known at compile time, it is recommended for performance reasons to use specific Euler rotation constructors such as EulerZXY(...).

    Euler(float3, RotationOrder)

    Returns a RigidTransform constructed by first performing 3 rotations around the principal axes in a given order. All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. When the rotation order is known at compile time, it is recommended for performance reasons to use specific Euler rotation constructors such as EulerZXY(...).

    EulerXYZ(float, float, float)

    Returns a RigidTransform constructed by first performing a rotation around the x-axis, then the y-axis and finally the z-axis. All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin.

    EulerXYZ(float3)

    Returns a RigidTransform constructed by first performing a rotation around the x-axis, then the y-axis and finally the z-axis. All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin.

    EulerXZY(float, float, float)

    Returns a RigidTransform constructed by first performing a rotation around the x-axis, then the z-axis and finally the y-axis. All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin.

    EulerXZY(float3)

    Returns a RigidTransform constructed by first performing a rotation around the x-axis, then the z-axis and finally the y-axis. All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin.

    EulerYXZ(float, float, float)

    Returns a RigidTransform constructed by first performing a rotation around the y-axis, then the x-axis and finally the z-axis. All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin.

    EulerYXZ(float3)

    Returns a RigidTransform constructed by first performing a rotation around the y-axis, then the x-axis and finally the z-axis. All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin.

    EulerYZX(float, float, float)

    Returns a RigidTransform constructed by first performing a rotation around the y-axis, then the z-axis and finally the x-axis. All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin.

    EulerYZX(float3)

    Returns a RigidTransform constructed by first performing a rotation around the y-axis, then the z-axis and finally the x-axis. All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin.

    EulerZXY(float, float, float)

    Returns a RigidTransform constructed by first performing a rotation around the z-axis, then the x-axis and finally the y-axis. All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. This is the default order rotation order in Unity.

    EulerZXY(float3)

    Returns a RigidTransform constructed by first performing a rotation around the z-axis, then the x-axis and finally the y-axis. All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. This is the default order rotation order in Unity.

    EulerZYX(float, float, float)

    Returns a RigidTransform constructed by first performing a rotation around the z-axis, then the y-axis and finally the x-axis. All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin.

    EulerZYX(float3)

    Returns a RigidTransform constructed by first performing a rotation around the z-axis, then the y-axis and finally the x-axis. All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin.

    GetHashCode()

    Returns a hash code for the RigidTransform.

    RotateX(float)

    Returns a RigidTransform that rotates around the x-axis by a given number of radians.

    RotateY(float)

    Returns a RigidTransform that rotates around the y-axis by a given number of radians.

    RotateZ(float)

    Returns a RigidTransform that rotates around the z-axis by a given number of radians.

    ToString()

    Returns a string representation of the RigidTransform.

    ToString(string, IFormatProvider)

    Returns a string representation of the RigidTransform using a specified format and culture-specific format information.

    Translate(float3)

    Returns a RigidTransform that translates by an amount specified by a float3 vector.

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)