docs.unity3d.com
    Show / Hide Table of Contents

    Struct BodyFrame

    A target in the space of a rigid body that will align with a corresponding target in the space of the other body to which it is constrained.

    Inherited Members
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Namespace: Unity.Physics
    Syntax
    public struct BodyFrame : IEquatable<BodyFrame>

    Constructors

    BodyFrame(RigidTransform)

    Constructor.

    Declaration
    public BodyFrame(RigidTransform transform)
    Parameters
    Type Name Description
    RigidTransform transform

    The transform.

    Fields

    Axis

    The bind pose orientation of the joint's x-axis in the space of its rigid body.

    Declaration
    public float3 Axis
    Field Value
    Type Description
    float3

    Identity

    The identity BodyFrame.

    Declaration
    public static readonly BodyFrame Identity
    Field Value
    Type Description
    BodyFrame

    PerpendicularAxis

    The bind pose orientation of the joint's y-axis in the space of its rigid body.

    Declaration
    public float3 PerpendicularAxis
    Field Value
    Type Description
    float3

    Position

    The bind pose anchor or target position of the joint in the space of its rigid body.

    Declaration
    public float3 Position
    Field Value
    Type Description
    float3

    Methods

    AsRigidTransform()

    Converts this object to a rigid transform.

    Declaration
    public RigidTransform AsRigidTransform()
    Returns
    Type Description
    RigidTransform

    A RigidTransform.

    Equals(Object)

    Tests if this object is considered equal to another.

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    Object obj

    The object to compare to this object.

    Returns
    Type Description
    Boolean

    True if the objects are considered equal, false if they are not.

    Overrides
    ValueType.Equals(Object)

    Equals(BodyFrame)

    Tests if this BodyFrame is considered equal to another.

    Declaration
    public bool Equals(BodyFrame other)
    Parameters
    Type Name Description
    BodyFrame other

    The body frame to compare to this object.

    Returns
    Type Description
    Boolean

    True if the objects are considered equal, false if they are not.

    Implements
    IEquatable<T>.Equals(T)

    GetHashCode()

    Calculates a hash code for this object.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    Int32

    A hash code for this object.

    Overrides
    ValueType.GetHashCode()

    ToString()

    Convert this object into a string representation.

    Declaration
    public override string ToString()
    Returns
    Type Description
    String

    A string that represents this object.

    Overrides
    ValueType.ToString()

    Operators

    Implicit(RigidTransform to BodyFrame)

    Implicit cast that converts the given RigidTransform to a BodyFrame.

    Declaration
    public static implicit operator BodyFrame(RigidTransform transform)
    Parameters
    Type Name Description
    RigidTransform transform

    The transform.

    Returns
    Type Description
    BodyFrame

    The result of the operation.

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023