A physical connection between two bodies, designed to simulate behaviour within a real body. It has two axis, a swing and twist axis, and also the perpendicular axis, similar to a Spherical joint, but more restrictive in it's angles and only two degrees of freedom. Two RigidBodies need to be defined to use it. Mostly used to create humanlike joints that behave like a lifeless body.

                 
                     anchor - it can twist on one axis and swing on another
                           │
        z            ┌───┐ │ ┌───┐
        ↑            │   │ ↓ │   │        e.g. z = TwistAxis, it can rotate in-itself around this axis 
   -x ←─┼─→ x        │   │ x │   │        e.g. x = SwingAxis, it can rotate anchored around the base on this axis   
        ↓            │   │   │   │           
       -z            └───┘   └───┘         e.g. you can twist the leg in-itself to a certain degree,
                                                    but also rotate it forward/backward/left/right to a certain degree
               bodyAnchor          bodyTied
             (e.g. pelvis)         (e.g. upper-leg)

Twist equals a rotation around a point without moving on an axis. Swing equals a rotation on a point with a moving local axis. *

Author

Marko Fehrenbach, HFU, 2020 | Jirka Dell'Oro-Friedl, HFU, 2021

Hierarchy (view full)

Constructors

Properties

baseClass: typeof Joint = Joint

refers back to this class from any subclass e.g. in order to find compatible other resources

iSubclass: number = ...

subclasses get a iSubclass number for identification

subclasses: typeof Joint[] = []

list of all the subclasses derived from this class, if they registered properly

Accessors

  • get breakForce(): number
  • The amount of force needed to break the JOINT, in Newton. 0 equals unbreakable (default)

    Returns number

  • set breakForce(_value): void
  • Parameters

    • _value: number

    Returns void

  • get breakTorque(): number
  • The amount of force needed to break the JOINT, while rotating, in Newton. 0 equals unbreakable (default)

    Returns number

  • set breakTorque(_value): void
  • Parameters

    • _value: number

    Returns void

  • get internalCollision(): boolean
  • If the two connected RigidBodies collide with eath other. (Default = false) On a welding joint the connected bodies should not be colliding with each other, for best results

    Returns boolean

  • set internalCollision(_value): void
  • Parameters

    • _value: boolean

    Returns void

  • get isSingleton(): boolean
  • Is true, when only one instance of the component class can be attached to a node

    Returns boolean

  • get type(): string
  • Retrieves the type of this mutable subclass as the name of the runtime class

    Returns string

    The type of the mutable

Methods

  • Initializing and connecting the two rigidbodies with the configured joint properties is automatically called by the physics system. No user interaction needed.

    Returns void

  • Disconnecting the two rigidbodies and removing them from the physics system, is automatically called by the physics system. No user interaction needed.

    Returns void

  • Collect applicable attributes of the instance and copies of their values in a Mutator-object. By default, a mutator cannot be extended, since extensions are not available in the object the mutator belongs to. A mutator may be reduced by the descendants of Mutable to contain only the properties needed.

    Returns Mutator

  • Returns the original Joint used by the physics engine. Used internally no user interaction needed. Only to be used when functionality that is not added within FUDGE is needed.

    Returns Joint

  • Check if connection is dirty, so when either rb is changed disconnect and reconnect. Internally used no user interaction needed.

    Returns boolean

  • Updates the attribute values of the instance according to the state of the mutator. The mutation may be restricted to a subset of the mutator and the event dispatching suppressed. Uses mutateBase, but can be overwritten in subclasses

    Parameters

    • _mutator: Mutator
    • _selection: string[] = null
    • _dispatchMutate: boolean = true

    Returns Promise<void>