Struct BlockRotation
public readonly record struct BlockRotation : IEquatable<BlockRotation>
- Implements
- Inherited Members
Remarks
Value is formed by combining the axes into one 6-bit value. The two least-significant bits are the yaw, the next two are the pitch, and the last two are the roll. All other bits should be zero.
Constructors
BlockRotation(Rotation, Rotation, Rotation)
public BlockRotation(Rotation yaw, Rotation pitch, Rotation roll)
Parameters
yawRotationpitchRotationrollRotation
BlockRotation(int)
public BlockRotation(int Value)
Parameters
ValueintThe raw rotation value, in the range
0..64
Remarks
Value is formed by combining the axes into one 6-bit value. The two least-significant bits are the yaw, the next two are the pitch, and the last two are the roll. All other bits should be zero.
Properties
Pitch
Pitch, the rotation around the X axis.
public Rotation Pitch { get; }
Property Value
- Rotation
Roll
Roll, the rotation around the Z axis.
public Rotation Roll { get; }
Property Value
- Rotation
Value
The raw rotation value, in the range 0..64
public int Value { get; init; }
Property Value
Yaw
Yaw, the rotation around the Y axis.
public Rotation Yaw { get; }
Property Value
- Rotation
Methods
Deconstruct(out Rotation, out Rotation, out Rotation)
public void Deconstruct(out Rotation yaw, out Rotation pitch, out Rotation roll)
Parameters
yawRotationpitchRotationrollRotation
Operators
implicit operator int(BlockRotation)
public static implicit operator int(BlockRotation rotation)
Parameters
rotationBlockRotation
Returns
implicit operator BlockRotation(int)
public static implicit operator BlockRotation(int value)
Parameters
valueint