Struct SyncTransform
This struct specifies information about a transform.
Inherited Members
Namespace: Unity.Reflect.Model
Syntax
public struct SyncTransform
Constructors
SyncTransform(float3, quaternion, float3)
Creates a SyncTransform.
Declaration
public SyncTransform(float3 position, quaternion rotation, float3 scale)
Parameters
Type | Name | Description |
---|---|---|
float3 | position | The position of the transform |
quaternion | rotation | The rotation of the transform |
float3 | scale | The scale of the transform |
SyncTransform(float4x4)
Creates a SyncTransform.
Declaration
public SyncTransform(float4x4 matrix)
Parameters
Type | Name | Description |
---|---|---|
float4x4 | matrix | A matrix to convert into a transform. |
Properties
Identity
Gets the identity transform.
Declaration
public static SyncTransform Identity { get; }
Property Value
Type | Description |
---|---|
SyncTransform |
Position
The position of the transform.
Declaration
public float3 Position { get; set; }
Property Value
Type | Description |
---|---|
float3 |
Rotation
The rotation of the transform.
Declaration
public quaternion Rotation { get; set; }
Property Value
Type | Description |
---|---|
quaternion |
Scale
The scale of the transform.
Declaration
public float3 Scale { get; set; }
Property Value
Type | Description |
---|---|
float3 |
Methods
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj |
Returns
Type | Description |
---|---|
Boolean |
Overrides
FlipYZ()
Creates a new transform by flipping the Y and Z axes.
Declaration
public SyncTransform FlipYZ()
Returns
Type | Description |
---|---|
SyncTransform | The result of the operation. |
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 |
Overrides
Inverse()
Computes the inverse transform.
Declaration
public SyncTransform Inverse()
Returns
Type | Description |
---|---|
SyncTransform | The result of the operation. |
TransformPoint(float3)
Applies the transform to a provided point.
Declaration
public float3 TransformPoint(float3 pt)
Parameters
Type | Name | Description |
---|---|---|
float3 | pt | The point to apply the transform to |
Returns
Type | Description |
---|---|
float3 | The result of the operation. |
TransformVector(float3)
Applies the transform to a provided vector.
Declaration
public float3 TransformVector(float3 vec)
Parameters
Type | Name | Description |
---|---|---|
float3 | vec | The vector to apply the transform to |
Returns
Type | Description |
---|---|
float3 | The result of the operation. |
Operators
Equality(SyncTransform, SyncTransform)
Declaration
public static bool operator ==(SyncTransform t1, SyncTransform t2)
Parameters
Type | Name | Description |
---|---|---|
SyncTransform | t1 | |
SyncTransform | t2 |
Returns
Type | Description |
---|---|
Boolean |
Inequality(SyncTransform, SyncTransform)
Declaration
public static bool operator !=(SyncTransform t1, SyncTransform t2)
Parameters
Type | Name | Description |
---|---|---|
SyncTransform | t1 | |
SyncTransform | t2 |
Returns
Type | Description |
---|---|
Boolean |
Multiply(SyncTransform, SyncTransform)
Declaration
public static SyncTransform operator *(SyncTransform left, SyncTransform right)
Parameters
Type | Name | Description |
---|---|---|
SyncTransform | left | |
SyncTransform | right |
Returns
Type | Description |
---|---|
SyncTransform |