Class Transform
A 4x4 homogeneous transform: a rotation and a translation.
public sealed class Transform : IEquatable<Transform>
- Inheritance
-
Transform
- Implements
- Inherited Members
Properties
Elements
Gets the sixteen elements, row-major.
public IReadOnlyList<float> Elements { get; }
Property Value
Identity
Gets the identity: no rotation and no translation.
public static Transform Identity { get; }
Property Value
Position
Gets where this transform places the origin: its translation.
public (float X, float Y, float Z) Position { get; }
Property Value
Methods
Equals(Transform?)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(Transform? other)
Parameters
otherTransformAn object to compare with this object.
Returns
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? obj)
Parameters
objobjectThe object to compare with the current object.
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
Multiply(Transform)
Returns this * other, the transform that applies other and then this one.
public Transform Multiply(Transform other)
Parameters
otherTransformThe transform further down the chain.
Returns
- Transform
The product.
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.