Fudge Core
    Preparing search index...

    Class JointAbstract

    Acts as the physical representation of a connection between two Node's. The type of conncetion is defined by the subclasses like prismatic joint, cylinder joint etc. A Rigidbody on the Node that this component is added to is needed. Setting the connectedRigidbody and initializing the connection creates a physical connection between them. This differs from a connection through hierarchy in the node structure of fudge. Joints can have different DOF's (Degrees Of Freedom), 1 Axis that can either twist or swing is a degree of freedom. A joint typically consists of a motor that limits movement/rotation or is activly trying to move to a limit. And a spring which defines the rigidity.

    Marko Fehrenbach, HFU 2020

    Hierarchy (View Summary)

    Index

    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 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: boolean): 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

    • Connect a child node with the given name to the joint.

      Parameters

      • _name: string

      Returns void

    • Connect the given node to the joint. Tieing its rigidbody to the nodes rigidbody this component is attached to.

      Parameters

      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>