Skip to content

Rotation3D

StructChartGuruChartGuru
public readonly struct Rotation3D

3D rotation expressed as Euler angles in degrees (Apple Swift parity: Rotation3D from RealityKit / SwiftCharts3D).

public readonly float PitchDeg

Returns

System.Single

public readonly float YawDeg

Returns

System.Single

public readonly float RollDeg

Returns

System.Single

public Rotation3D(float pitchDeg, float yawDeg, float rollDeg)

Creates an Euler rotation in degrees around the X (pitch), Y (yaw), and Z (roll) axes.

Parameters

Name Type
pitchDeg System.Single
yawDeg System.Single
rollDeg System.Single

public Quaternion ToQuaternion()

Converts the stored Euler angles to the Unity quaternion used to rotate 3D chart symbols.

Returns

UnityEngine.Quaternion

public static Rotation3D Pitch(float deg)

Creates a rotation containing only an X-axis pitch in degrees.

Parameters

Name Type
deg System.Single

Returns

ChartGuru.Rotation3D

public static Rotation3D Yaw(float deg)

Creates a rotation containing only a Y-axis yaw in degrees.

Parameters

Name Type
deg System.Single

Returns

ChartGuru.Rotation3D

public static Rotation3D Roll(float deg)

Creates a rotation containing only a Z-axis roll in degrees.

Parameters

Name Type
deg System.Single

Returns

ChartGuru.Rotation3D

public static Rotation3D Identity { get; }

Returns

ChartGuru.Rotation3D