mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-03-24 19:34:42 -05:00
43 lines
1.1 KiB
C#
43 lines
1.1 KiB
C#
namespace UniVRM10
|
|
{
|
|
public readonly struct LookAtEyeDirection
|
|
{
|
|
/// <summary>
|
|
/// Yaw of LeftEye
|
|
/// </summary>
|
|
public float LeftYaw { get; }
|
|
|
|
/// <summary>
|
|
/// Pitch of LeftEye
|
|
/// </summary>
|
|
public float LeftPitch { get; }
|
|
|
|
/// <summary>
|
|
/// Yaw of RightEye
|
|
/// </summary>
|
|
public float RightYaw { get; }
|
|
|
|
/// <summary>
|
|
/// Pitch of RightEye
|
|
/// </summary>
|
|
public float RightPitch { get; }
|
|
|
|
public LookAtEyeDirection(float leftYaw, float leftPitch, float rightYaw, float rightPitch)
|
|
{
|
|
LeftYaw = leftYaw;
|
|
LeftPitch = leftPitch;
|
|
RightYaw = rightYaw;
|
|
RightPitch = rightPitch;
|
|
}
|
|
|
|
public static LookAtEyeDirection Multiply(LookAtEyeDirection a, float b)
|
|
{
|
|
return new LookAtEyeDirection(
|
|
a.LeftYaw * b,
|
|
a.LeftPitch * b,
|
|
a.RightYaw * b,
|
|
a.RightPitch * b
|
|
);
|
|
}
|
|
}
|
|
} |