< Summary

Information
Class: Gravitas.Constraints.RagdollJointDefinition3D
Assembly: Gravitas
File(s): /home/runner/work/Gravitas/Gravitas/src/Gravitas/Constraints/3D/RagdollJointDefinition3D.cs
Line coverage
100%
Covered lines: 19
Uncovered lines: 0
Coverable lines: 19
Total lines: 100
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%
.ctor(...)100%11100%

File(s)

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

#LineLine coverage
 1//=======================================================================
 2// RagdollJointDefinition3D.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 joint entry for a deterministic 3D ragdoll articulation.
 14/// </summary>
 15public readonly struct RagdollJointDefinition3D
 16{
 17    /// <summary>
 18    /// Creates a ragdoll joint definition with unrestricted limits, no motor, and adjacent self-collision suppression.
 19    /// </summary>
 20    public RagdollJointDefinition3D(
 21        int linkAId,
 22        int linkBId,
 23        JointType3D type,
 24        FixedTransform localFrameA,
 25        FixedTransform localFrameB)
 4326        : this(
 4327            linkAId,
 4328            linkBId,
 4329            type,
 4330            localFrameA,
 4331            localFrameB,
 4332            JointLimit3D.Unrestricted,
 4333            JointMotor3D.Disabled,
 4334            JointCollisionPolicy.SuppressLinked)
 35    {
 4336    }
 37
 38    /// <summary>
 39    /// Creates a ragdoll joint definition.
 40    /// </summary>
 41    public RagdollJointDefinition3D(
 42        int linkAId,
 43        int linkBId,
 44        JointType3D type,
 45        FixedTransform localFrameA,
 46        FixedTransform localFrameB,
 47        JointLimit3D limits,
 48        JointMotor3D motor,
 49        JointCollisionPolicy collisionPolicy)
 50    {
 6251        LinkAId = linkAId;
 6252        LinkBId = linkBId;
 6253        Type = type;
 6254        LocalFrameA = localFrameA;
 6255        LocalFrameB = localFrameB;
 6256        Limits = limits;
 6257        Motor = motor;
 6258        CollisionPolicy = collisionPolicy;
 6259    }
 60
 61    /// <summary>
 62    /// Gets the first authored link ID.
 63    /// </summary>
 64    public int LinkAId { get; }
 65
 66    /// <summary>
 67    /// Gets the second authored link ID.
 68    /// </summary>
 69    public int LinkBId { get; }
 70
 71    /// <summary>
 72    /// Gets the joint type.
 73    /// </summary>
 74    public JointType3D Type { get; }
 75
 76    /// <summary>
 77    /// Gets the local frame for the first link.
 78    /// </summary>
 79    public FixedTransform LocalFrameA { get; }
 80
 81    /// <summary>
 82    /// Gets the local frame for the second link.
 83    /// </summary>
 84    public FixedTransform LocalFrameB { get; }
 85
 86    /// <summary>
 87    /// Gets optional angular limit data.
 88    /// </summary>
 89    public JointLimit3D Limits { get; }
 90
 91    /// <summary>
 92    /// Gets optional angular motor data.
 93    /// </summary>
 94    public JointMotor3D Motor { get; }
 95
 96    /// <summary>
 97    /// Gets physical collision filtering behavior for the linked colliders.
 98    /// </summary>
 99    public JointCollisionPolicy CollisionPolicy { get; }
 100}