Struct AffineTransform
Rigid transform with only translation and rotation components.
Inherited Members
Namespace: UnityEngine.Animations.Rigging
Assembly: Unity.Animation.Rigging.dll
Syntax
[Serializable]
public struct AffineTransform
  Constructors
AffineTransform(Vector3, Quaternion)
Constructor.
Declaration
public AffineTransform(Vector3 t, Quaternion r)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Vector3 | t | Translation component of the AffineTransform.  | 
      
| Quaternion | r | Rotation component of the AffineTransform.  | 
      
Fields
rotation
Rotation component of the AffineTransform.
Declaration
public Quaternion rotation
  Field Value
| Type | Description | 
|---|---|
| Quaternion | 
translation
Translation component of the AffineTransform.
Declaration
public Vector3 translation
  Field Value
| Type | Description | 
|---|---|
| Vector3 | 
Properties
identity
AffineTransform identity value.
Declaration
public static AffineTransform identity { get; }
  Property Value
| Type | Description | 
|---|---|
| AffineTransform | 
Methods
Inverse()
Calculates the inverse of the AffineTransform.
Declaration
public AffineTransform Inverse()
  Returns
| Type | Description | 
|---|---|
| AffineTransform | The inverse of the AffineTransform.  | 
      
InverseMul(AffineTransform)
Multiply a transform by the inverse of the AffineTransform.
Declaration
public AffineTransform InverseMul(AffineTransform transform)
  Parameters
| Type | Name | Description | 
|---|---|---|
| AffineTransform | transform | AffineTransform value.  | 
      
Returns
| Type | Description | 
|---|---|
| AffineTransform | Multiplied AffineTransform result.  | 
      
InverseTransform(Vector3)
Transforms a Vector3 point by the inverse of the AffineTransform.
Declaration
public Vector3 InverseTransform(Vector3 p)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Vector3 | p | Vector3 point.  | 
      
Returns
| Type | Description | 
|---|---|
| Vector3 | Transformed Vector3 point.  | 
      
Set(Vector3, Quaternion)
Sets the translation and rotation in the AffineTransform.
Declaration
public void Set(Vector3 t, Quaternion r)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Vector3 | t | Translation component of the AffineTransform.  | 
      
| Quaternion | r | Rotation component of the AffineTransform.  | 
      
Transform(Vector3)
Transforms a Vector3 point by the AffineTransform.
Declaration
public Vector3 Transform(Vector3 p)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Vector3 | p | Vector3 point.  | 
      
Returns
| Type | Description | 
|---|---|
| Vector3 | Transformed Vector3 point.  | 
      
Operators
operator *(AffineTransform, AffineTransform)
Multiplies two AffineTransform.
Declaration
public static AffineTransform operator *(AffineTransform lhs, AffineTransform rhs)
  Parameters
| Type | Name | Description | 
|---|---|---|
| AffineTransform | lhs | First AffineTransform value.  | 
      
| AffineTransform | rhs | Second AffineTransform value.  | 
      
Returns
| Type | Description | 
|---|---|
| AffineTransform | Multiplied AffineTransform result.  | 
      
operator *(AffineTransform, Quaternion)
Transforms a Quaternion value by the AffineTransform.
Declaration
public static AffineTransform operator *(AffineTransform lhs, Quaternion rhs)
  Parameters
| Type | Name | Description | 
|---|---|---|
| AffineTransform | lhs | AffineTransform value.  | 
      
| Quaternion | rhs | Quaternion rotation.  | 
      
Returns
| Type | Description | 
|---|---|
| AffineTransform | Transformed AffineTransform result.  | 
      
operator *(AffineTransform, Vector3)
Transforms a Vector3 point by the AffineTransform.
Declaration
public static Vector3 operator *(AffineTransform lhs, Vector3 rhs)
  Parameters
| Type | Name | Description | 
|---|---|---|
| AffineTransform | lhs | AffineTransform value.  | 
      
| Vector3 | rhs | Vector3 point.  | 
      
Returns
| Type | Description | 
|---|---|
| Vector3 | Transformed Vector3 point.  | 
      
operator *(Quaternion, AffineTransform)
Rotates an AffineTransform.
Declaration
public static AffineTransform operator *(Quaternion lhs, AffineTransform rhs)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Quaternion | lhs | Quaternion rotation.  | 
      
| AffineTransform | rhs | AffineTransform value.  | 
      
Returns
| Type | Description | 
|---|---|
| AffineTransform | Rotated AffineTransform result.  |