• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

MeltyPlayer / MeltyTool / 20982513833

14 Jan 2026 04:35AM UTC coverage: 41.138% (-0.8%) from 41.907%
20982513833

push

github

MeltyPlayer
Fixed broken shader source tests.

6752 of 18485 branches covered (36.53%)

Branch coverage included in aggregate %.

28650 of 67572 relevant lines covered (42.4%)

64006.02 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

30.0
/FinModelUtility/Fin/Fin/src/model/util/SkeletonExtensions.cs
1
using System;
2
using System.Numerics;
3

4
using fin.math.matrix.four;
5
using fin.math.rotations;
6
using fin.math.xyz;
7
using fin.ui;
8

9

10
namespace fin.model.util;
11

12
public static class SkeletonExtensions {
13
  public static IBone AddChild(this IBone parent, Vector3 position)
14
    => parent.AddChild(position.X, position.Y, position.Z);
3,769✔
15

16
  public static IBone AddChild(this IBone parent, IReadOnlyXyz position)
17
    => parent.AddChild(position.X, position.Y, position.Z);
80✔
18

19
  public static IBone AddChild(this IBone parent,
20
                               IReadOnlyFinMatrix4x4 matrix)
21
    => parent.AddChild(matrix.Impl);
285✔
22

23
  public static IBone AddChild(this IBone parent, Matrix4x4 matrix) {
1,897✔
24
    matrix.AssertDecompose(out var translation,
1,897✔
25
                           out var rotation,
1,897✔
26
                           out var scale);
1,897✔
27

28
    var child = parent.AddChild(translation);
1,897✔
29
    child.Transform.LocalRotation = rotation;
1,897✔
30
    child.Transform.LocalScale = scale;
1,897✔
31

32
    return child;
1,897✔
33
  }
1,897✔
34

35
  public static bool TryGetFaceCameraQuaternion(
36
      this IReadOnlyBone? bone,
37
      out Quaternion rotation) {
×
38
    var faceTowardsCameraType
×
39
        = bone?.FaceTowardsCameraType ?? FaceTowardsCameraType.NONE;
×
40
    if (faceTowardsCameraType != FaceTowardsCameraType.NONE) {
×
41
      var camera = Camera.Instance;
×
42
      if (faceTowardsCameraType is FaceTowardsCameraType.YAW_AND_PITCH) {
×
43
        rotation = Quaternion.CreateFromAxisAngle(
×
44
            Vector3.UnitZ,
×
45
            camera.YawDegrees * FinTrig.DEG_2_RAD - MathF.PI / 2);
×
46
        rotation *= Quaternion.CreateFromAxisAngle(
×
47
            Vector3.UnitX,
×
48
            camera.PitchDegrees * FinTrig.DEG_2_RAD + MathF.PI / 2);
×
49
      } else {
×
50
        rotation = Quaternion.CreateFromAxisAngle(Vector3.UnitX, MathF.PI / 2);
×
51
        rotation *= Quaternion.CreateFromAxisAngle(
×
52
            Vector3.UnitZ,
×
53
            camera.YawDegrees * FinTrig.DEG_2_RAD - MathF.PI / 2);
×
54
      }
×
55
      return true;
×
56
    }
57

58
    rotation = default;
×
59
    return false;
×
60
  }
×
61
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc