docs.unity3d.com
Search Results for

    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.

    Implements
    IEquatable<BodyFrame>
    Inherited Members
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Unity.Physics
    Assembly: Unity.Physics.dll
    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
    bool

    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
    bool

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

    GetHashCode()

    Calculates a hash code for this object.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    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 operator BodyFrame(RigidTransform)

    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.

    Implements

    IEquatable<T>
    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)