math docs
    Preparing search index...

    Type Alias Joint3

    A joint's rotational limits.

    Which fields apply depends on type: rotor for JointType.BALL, and rotationAxis, referenceAxis, clockwise and anticlockwise for the two hinge types. All angles are in radians, and a limit of PI means unconstrained.

    type Joint3 = {
        anticlockwise: number;
        clockwise: number;
        referenceAxis: vec3.Vec3;
        rotationAxis: vec3.Vec3;
        rotor: number;
        type: JointType;
    }
    Index
    anticlockwise: number

    Hinge: how far the bone may swing anticlockwise of referenceAxis, in [0, PI].

    clockwise: number

    Hinge: how far the bone may swing clockwise of referenceAxis, in [0, PI].

    referenceAxis: vec3.Vec3

    Hinge: the zero direction the clockwise and anticlockwise limits are measured from. Unit length, perpendicular to rotationAxis.

    rotationAxis: vec3.Vec3

    Hinge: the axis the bone rotates about. Unit length.

    rotor: number

    Ball: the half-angle of the cone about the previous bone's direction, in [0, PI].

    type: JointType

    Which of the fields below apply.