< Summary

Information
Class: Gravitas.Constraints.JointDefinition3D
Assembly: Gravitas
File(s): /home/runner/work/Gravitas/Gravitas/src/Gravitas/Constraints/3D/JointDefinition3D.cs
Line coverage
100%
Covered lines: 9
Uncovered lines: 0
Coverable lines: 9
Total lines: 79
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%11100%

File(s)

/home/runner/work/Gravitas/Gravitas/src/Gravitas/Constraints/3D/JointDefinition3D.cs

#LineLine coverage
 1//=======================================================================
 2// JointDefinition3D.cs
 3//=======================================================================
 4// MIT License, Copyright (c) 2026-present David Oravsky (mrdav30)
 5// See LICENSE file in the project root for full license information.
 6//=======================================================================
 7
 8using FixedMathSharp;
 9
 10namespace Gravitas.Constraints;
 11
 12/// <summary>
 13/// Authored payload used to register one context-owned deterministic 3D joint.
 14/// </summary>
 15public readonly struct JointDefinition3D
 16{
 17    /// <summary>
 18    /// Creates a 3D joint definition.
 19    /// </summary>
 20    public JointDefinition3D(
 21        SolidBody bodyA,
 22        SolidBody bodyB,
 23        FixedTransform localFrameA,
 24        FixedTransform localFrameB,
 25        JointType3D type,
 26        JointLimit3D limits,
 27        JointMotor3D motor,
 28        JointCollisionPolicy collisionPolicy)
 29    {
 37730        BodyA = bodyA;
 37731        BodyB = bodyB;
 37732        LocalFrameA = localFrameA;
 37733        LocalFrameB = localFrameB;
 37734        Type = type;
 37735        Limits = limits;
 37736        Motor = motor;
 37737        CollisionPolicy = collisionPolicy;
 37738    }
 39
 40    /// <summary>
 41    /// Gets the first body linked by the joint.
 42    /// </summary>
 43    public SolidBody BodyA { get; }
 44
 45    /// <summary>
 46    /// Gets the second body linked by the joint.
 47    /// </summary>
 48    public SolidBody BodyB { get; }
 49
 50    /// <summary>
 51    /// Gets the first local anchor frame. Values are copied at registration time.
 52    /// </summary>
 53    public FixedTransform LocalFrameA { get; }
 54
 55    /// <summary>
 56    /// Gets the second local anchor frame. Values are copied at registration time.
 57    /// </summary>
 58    public FixedTransform LocalFrameB { get; }
 59
 60    /// <summary>
 61    /// Gets the joint type.
 62    /// </summary>
 63    public JointType3D Type { get; }
 64
 65    /// <summary>
 66    /// Gets optional angular limit data.
 67    /// </summary>
 68    public JointLimit3D Limits { get; }
 69
 70    /// <summary>
 71    /// Gets optional angular motor data.
 72    /// </summary>
 73    public JointMotor3D Motor { get; }
 74
 75    /// <summary>
 76    /// Gets physical collision filtering behavior for the linked colliders.
 77    /// </summary>
 78    public JointCollisionPolicy CollisionPolicy { get; }
 79}