Struct CustomTransformData
Custom transform data. This value is used for custom transforming on mesh layer data. (Quad, Cylinder, EquirectMesh and CubeProjection.)
Inherited Members
Namespace: Unity.XR.CompositionLayers.Layers
Assembly: solution.dll
Syntax
public struct CustomTransformDataConstructors
CustomTransformData(Matrix4x4, CustomTransformMatrixType)
Constructor.
Declaration
public CustomTransformData(Matrix4x4 matrix, CustomTransformMatrixType matrixType = CustomTransformMatrixType.Model)Parameters
| Type | Name | Description | 
|---|---|---|
| Matrix4x4 | matrix | Matrix for transforming. | 
| CustomTransformMatrixType | matrixType | Indicate matrix type. | 
Fields
Matrix
Transform matrix. This is treated as a model matrix by default.
Declaration
public Matrix4x4 MatrixField Value
| Type | Description | 
|---|---|
| Matrix4x4 | 
MatrixType
Indicate matrix type.
Declaration
public CustomTransformMatrixType MatrixTypeField Value
| Type | Description | 
|---|---|
| CustomTransformMatrixType | 
Properties
Default
Create a default instance.
Declaration
public static CustomTransformData Default { get; }Property Value
| Type | Description | 
|---|---|
| CustomTransformData | Return a default instance. Matrix is set to identity. | 
Methods
Equals(object)
Check if two CustomTransformData are equal.
Declaration
public override bool Equals(object obj)Parameters
| Type | Name | Description | 
|---|---|---|
| object | obj | customTransformData to compare | 
Returns
| Type | Description | 
|---|---|
| bool | Return true if equal. | 
Overrides
Equals(CustomTransformData)
Check if two CustomTransformData are equal.
Declaration
public bool Equals(CustomTransformData rhs)Parameters
| Type | Name | Description | 
|---|---|---|
| CustomTransformData | rhs | customTransformData to compare | 
Returns
| Type | Description | 
|---|---|
| bool | Return true if equal. | 
GetHashCode()
Get Hash Code.
Declaration
public override int GetHashCode()Returns
| Type | Description | 
|---|---|
| int | hash code. | 
Overrides
SetLocalPoseMatrix(Transform)
Set local pose matrix to Matrix. Scale value is ignoired.
Declaration
public void SetLocalPoseMatrix(Transform transform)Parameters
| Type | Name | Description | 
|---|---|---|
| Transform | transform | transform to translate | 
SetLocalPoseMatrixInSceneView(Transform, Camera)
Set local pose matrix to Matrix in Scene View. This function simulates the local pose transforming in Scene View.
Declaration
public void SetLocalPoseMatrixInSceneView(Transform transform, Camera mainCamera)Parameters
| Type | Name | Description | 
|---|---|---|
| Transform | transform | transform to translate | 
| Camera | mainCamera | main camera | 
SetWorldPoseMatrix(Transform)
Set world pose matrix to Matrix. Scale value is ignoired.
Declaration
public void SetWorldPoseMatrix(Transform transform)Parameters
| Type | Name | Description | 
|---|---|---|
| Transform | transform | transform to translate | 
Operators
operator ==(CustomTransformData, CustomTransformData)
Return true if two CustomTransformDatas are equal .
Declaration
public static bool operator ==(CustomTransformData lhs, CustomTransformData rhs)Parameters
| Type | Name | Description | 
|---|---|---|
| CustomTransformData | lhs | customTransformData to compare | 
| CustomTransformData | rhs | customTransformData to compare | 
Returns
| Type | Description | 
|---|---|
| bool | Return True if equal. | 
operator !=(CustomTransformData, CustomTransformData)
Return true if two CustomTransformDatas are not equal .
Declaration
public static bool operator !=(CustomTransformData lhs, CustomTransformData rhs)Parameters
| Type | Name | Description | 
|---|---|---|
| CustomTransformData | lhs | customTransformData to compare | 
| CustomTransformData | rhs | customTransformData to compare | 
Returns
| Type | Description | 
|---|---|
| bool | Return True if not equal. |