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

MeltyPlayer / MeltyTool / 21128198772

19 Jan 2026 06:56AM UTC coverage: 42.312% (-0.01%) from 42.324%
21128198772

push

github

MeltyPlayer
Fixed GDL billboards.

6865 of 18372 branches covered (37.37%)

Branch coverage included in aggregate %.

6 of 31 new or added lines in 4 files covered. (19.35%)

1 existing line in 1 file now uncovered.

29415 of 67373 relevant lines covered (43.66%)

64528.51 hits per line

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

26.09
/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,775✔
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

NEW
43
      rotation = bone?.FaceTowardsCameraPreAdjustment ?? Quaternion.Identity;
×
44
      if (faceTowardsCameraType is FaceTowardsCameraType.YAW_AND_PITCH) {
×
NEW
45
        rotation *= Quaternion.CreateFromAxisAngle(
×
46
            Vector3.UnitZ,
×
47
            camera.YawDegrees * FinTrig.DEG_2_RAD - MathF.PI / 2);
×
48
        rotation *= Quaternion.CreateFromAxisAngle(
×
49
            Vector3.UnitX,
×
50
            camera.PitchDegrees * FinTrig.DEG_2_RAD + MathF.PI / 2);
×
51
      } else {
×
NEW
52
        rotation *= Quaternion.CreateFromAxisAngle(Vector3.UnitX, MathF.PI / 2);
×
53
        rotation *= Quaternion.CreateFromAxisAngle(
×
54
            Vector3.UnitZ,
×
55
            camera.YawDegrees * FinTrig.DEG_2_RAD - MathF.PI / 2);
×
56
      }
×
NEW
57
      rotation *= bone?.FaceTowardsCameraPostAdjustment ?? Quaternion.Identity;
×
58

UNCOV
59
      return true;
×
60
    }
61

62
    rotation = default;
×
63
    return false;
×
64
  }
×
65
}
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