Module org.dyn4j

Interface LinearMotorJoint

  • All Known Implementing Classes:
    PrismaticJoint

    public interface LinearMotorJoint
    Represents a joint with a linear motor.
    Since:
    5.0.0
    Version:
    5.0.0
    Author:
    William Bittle
    • Method Detail

      • isMotorEnabled

        boolean isMotorEnabled()
        Returns true if the motor is enabled.
        Returns:
        boolean
      • setMotorEnabled

        void setMotorEnabled​(boolean motorEnabled)
        Enables or disables the motor.
        Parameters:
        motorEnabled - true if the motor should be enabled
      • getMotorSpeed

        double getMotorSpeed()
        Returns the target motor speed in meters / second.
        Returns:
        double
      • setMotorSpeed

        void setMotorSpeed​(double motorSpeed)
        Sets the target motor speed.
        Parameters:
        motorSpeed - the target motor speed in meters / second
        See Also:
        setMaximumMotorForce(double)
      • getMaximumMotorForce

        double getMaximumMotorForce()
        Returns the maximum force the motor can apply to the joint to achieve the target speed.
        Returns:
        double
      • setMaximumMotorForce

        void setMaximumMotorForce​(double maximumMotorForce)
        Sets the maximum force the motor can apply to the joint to achieve the target speed.
        Parameters:
        maximumMotorForce - the maximum force in newtons; must be greater than zero
        Throws:
        IllegalArgumentException - if maxMotorForce is less than zero
        See Also:
        setMotorSpeed(double)
      • setMaximumMotorForceEnabled

        void setMaximumMotorForceEnabled​(boolean enabled)
        Sets whether the maximum motor force is enabled.
        Parameters:
        enabled - true if the maximum motor force should be enabled
        Since:
        5.0.0
      • isMaximumMotorForceEnabled

        boolean isMaximumMotorForceEnabled()
        Returns true if the maximum motor force is enabled.
        Returns:
        boolean
        Since:
        5.0.0
      • getMotorForce

        double getMotorForce​(double invdt)
        Returns the applied motor force.
        Parameters:
        invdt - the inverse delta time
        Returns:
        double