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
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
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
GetHashCode()
Calculates a hash code for this object.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 | A hash code for this object. |
Overrides
ToString()
Convert this object into a string representation.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String | A string that represents this object. |
Overrides
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. |