Class JointData

Hierarchy

  • JointData

Constructors

Properties

anchor1: Vector
anchor2: Vector
axesMask: JointAxesMask
axis: Vector
damping: number
frame1: Rotation
frame2: Rotation
jointType: JointType
length: number
limits: number[]
limitsEnabled: boolean
stiffness: number

Methods

  • Returns RawGenericJoint

  • Creates a new joint descriptor that builds a Fixed joint.

    A fixed joint removes all the degrees of freedom between the affected bodies, ensuring their anchor and local frames coincide in world-space.

    Parameters

    • anchor1: Vector

      Point where the joint is attached on the first rigid-body affected by this joint. Expressed in the local-space of the rigid-body.

    • frame1: Rotation

      The reference orientation of the joint wrt. the first rigid-body.

    • anchor2: Vector

      Point where the joint is attached on the second rigid-body affected by this joint. Expressed in the local-space of the rigid-body.

    • frame2: Rotation

      The reference orientation of the joint wrt. the second rigid-body.

    Returns JointData

  • Create a new joint descriptor that builds generic joints.

    A generic joint allows customizing its degrees of freedom by supplying a mask of the joint axes that should remain locked.

    Parameters

    • anchor1: Vector

      Point where the joint is attached on the first rigid-body affected by this joint. Expressed in the local-space of the rigid-body.

    • anchor2: Vector

      Point where the joint is attached on the second rigid-body affected by this joint. Expressed in the local-space of the rigid-body.

    • axis: Vector

      The X axis of the joint, expressed in the local-space of the rigid-bodies it is attached to.

    • axesMask: JointAxesMask

      Mask representing the locked axes of the joint. You can use logical OR to select these from the JointAxesMask enum. For example, passing (JointAxesMask.AngX || JointAxesMask.AngY) will create a joint locked in the X and Y rotational axes.

    Returns JointData

  • Creates a new joint descriptor that builds a Prismatic joint.

    A prismatic joint removes all the degrees of freedom between the affected bodies, except for the translation along one axis.

    Parameters

    • anchor1: Vector

      Point where the joint is attached on the first rigid-body affected by this joint. Expressed in the local-space of the rigid-body.

    • anchor2: Vector

      Point where the joint is attached on the second rigid-body affected by this joint. Expressed in the local-space of the rigid-body.

    • axis: Vector

      Axis of the joint, expressed in the local-space of the rigid-bodies it is attached to.

    Returns JointData

  • Create a new joint descriptor that builds Revolute joints.

    A revolute joint removes all degrees of freedom between the affected bodies except for the rotation along one axis.

    Parameters

    • anchor1: Vector

      Point where the joint is attached on the first rigid-body affected by this joint. Expressed in the local-space of the rigid-body.

    • anchor2: Vector

      Point where the joint is attached on the second rigid-body affected by this joint. Expressed in the local-space of the rigid-body.

    • axis: Vector

      Axis of the joint, expressed in the local-space of the rigid-bodies it is attached to.

    Returns JointData

  • Create a new joint descriptor that builds spherical joints.

    A spherical joint allows three relative rotational degrees of freedom by preventing any relative translation between the anchors of the two attached rigid-bodies.

    Parameters

    • anchor1: Vector

      Point where the joint is attached on the first rigid-body affected by this joint. Expressed in the local-space of the rigid-body.

    • anchor2: Vector

      Point where the joint is attached on the second rigid-body affected by this joint. Expressed in the local-space of the rigid-body.

    Returns JointData

  • Parameters

    • rest_length: number
    • stiffness: number
    • damping: number
    • anchor1: Vector
    • anchor2: Vector

    Returns JointData

Generated using TypeDoc