< Summary

Information
Class: FixedMathSharp.Geometry.SegmentConeSurfaceInput
Assembly: FixedMathSharp
File(s): /home/runner/work/FixedMathSharp/FixedMathSharp/src/FixedMathSharp/Geometry/Wide/FiniteAxis/SegmentConeSurfaceInput.cs
Line coverage
100%
Covered lines: 13
Uncovered lines: 0
Coverable lines: 13
Total lines: 44
Line coverage: 100%
Branch coverage
100%
Covered branches: 12
Total branches: 12
Branch coverage: 100%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_IsAffine()100%22100%
get_Words()100%22100%
get_FamilyWords()100%22100%
get_ValueWords()100%22100%
.ctor(...)100%11100%
.ctor(...)100%44100%

File(s)

/home/runner/work/FixedMathSharp/FixedMathSharp/src/FixedMathSharp/Geometry/Wide/FiniteAxis/SegmentConeSurfaceInput.cs

#LineLine coverage
 1//=======================================================================
 2// SegmentConeSurfaceInput.cs
 3//=======================================================================
 4// MIT License, Copyright (c) 2024-present David Oravsky (mrdav30)
 5// See LICENSE file in the project root for full license information.
 6//=======================================================================
 7
 8using System;
 9using static FixedMathSharp.Geometry.CylinderContactAlgebra;
 10using static FixedMathSharp.Geometry.ContactQuadratic;
 11
 12namespace FixedMathSharp.Geometry;
 13
 14/// <summary>Neutral source provenance sufficient to reconstruct one exact chart.</summary>
 15internal readonly struct SegmentConeSurfaceInput
 16{
 17    internal readonly FixedSegment Segment;
 18    internal readonly Vector3d Origin, Center;
 19    internal readonly FixedQuaternion Rotation, ConeRotation;
 20    internal readonly Fixed64 Height, Radius;
 21    internal readonly ScaledRigidFrame3d SourceFrame;
 22    internal readonly bool HasSourceFrame;
 3089623    internal bool IsAffine => HasSourceFrame && !SourceFrame.IsRigid;
 1826724    internal int Words => IsAffine ? 120 : CylinderContactAlgebra.Words;
 917025    internal int FamilyWords => IsAffine ? 3 * SegmentConeSurfaceCandidates.FamilyWords : SegmentConeSurfaceCandidates.F
 26926    internal int ValueWords => IsAffine ? 3 * CircularRimContactAlgebra.ValueWords : CircularRimContactAlgebra.ValueWord
 27
 28    internal SegmentConeSurfaceInput(FixedSegment segment, Vector3d origin, FixedQuaternion rotation,
 29        Vector3d center, FixedQuaternion coneRotation, Fixed64 height, Fixed64 radius)
 30    {
 35431        SourceFrame = default; HasSourceFrame = false;
 70832        Segment = segment; Origin = origin; Rotation = rotation; Center = center;
 53133        ConeRotation = coneRotation; Height = height; Radius = radius;
 17734    }
 35
 36    internal SegmentConeSurfaceInput(FixedSegment segment, in ScaledRigidFrame3d sourceFrame,
 37        Vector3d center, FixedQuaternion rotation, Fixed64 height, Fixed64 radius)
 38    {
 939        SourceFrame = sourceFrame; HasSourceFrame = true; Segment = segment;
 340        Origin = sourceFrame.IsRigid ? sourceFrame.RigidOrigin : center;
 341        Rotation = sourceFrame.IsRigid ? sourceFrame.Rotation : rotation;
 1242        Center = center; ConeRotation = rotation; Height = height; Radius = radius;
 343    }
 44}