Class ValveMath
Namespace: ValveResourceFormat.Animation
Assembly: ValveResourceFormat.dll
Rotation and angle helpers for nodes specific to the Source 2 graph.
csharp
public static class ValveMathInheritance
object ← ValveMath
Methods
AngleNormalize(float)
Wraps an angle in degrees into [-180, 180].
csharp
public static float AngleNormalize(float angle)Parameters
angle float
Returns
float
BuildRootToBoneChain(Skeleton, int, Span<int>)
The model space path from the root to a bone, root first.
csharp
public static int BuildRootToBoneChain(Skeleton skeleton, int boneIdx, Span<int> chain)Parameters
skeleton Skeleton
boneIdx int
chain Span<int>
Returns
int
FromTo(Vector3, Vector3)
The rotation from one vector onto another, through their half vector.
csharp
public static Quaternion FromTo(Vector3 from, Vector3 to)Parameters
from Vector3
to Vector3
Returns
ToPitchYaw(Quaternion)
Pitch (positive down) and yaw in degrees, as Source decomposes a rotation.
csharp
public static (float Pitch, float Yaw) ToPitchYaw(Quaternion q)
