A physical connection between two bodies with a defined axe of translation and rotation. Two Degrees of Freedom in the defined axis. Two RigidBodies need to be defined to use it. A motor can be defined for rotation and translation, along with spring settings.

         JointHolder - bodyAnchor
                   ┌───┐
                   │   │
          <────────│   │──────> tied body, sliding on axis = 1st degree of freedom
                   │   │        rotating around axis = 2nd degree of freedom 
                   └───┘

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

  • set maxMotor(_value): void
  • The Upper Limit of movement along the axis of this joint. The limiter is disable if lowerLimit > upperLimit.

    Parameters

    • _value: number

    Returns void

  • set minMotor(_value): void
  • The Lower Limit of movement along the axis of this joint. The limiter is disable if lowerLimit > upperLimit.

    Parameters

    • _value: number

    Returns void

  • set springFrequency(_value): void
  • The frequency of the spring in Hz. At 0 the spring is rigid, equals no spring. The smaller the value the less restrictive is the spring.

    Parameters

    • _value: number

    Returns void

  • 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

  • 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>